On Thu, Aug 22, 2013 at 8:28 PM, Luis Rojas C. (CATIE) <
luisro...@catie.ac.cr> wrote:
> How can enable read authorization to all items from the data bases with a
> sql sentence??

Hi Luis,

here's a SELECT query for you to play with. It should be easy to change it
into an INSERT INTO query once you're satisfied with it.

SELECT resource_type_id, resource_id, action_id, epersongroup_idFROM
resourcepolicyWHERE resource_type_id = 2AND resource_id IN (SELECT
item_id FROM item);

You can safely leave out the last line, it's just to show you the relation.

If you want READ access (action_id = 0) for the Anonymous group, use
epersongroup_id = 0 (see the epersongroup table).

One thing though - are you sure you meant read access to items
(resource_type_id = 2), not bitstreams (resource_type_id = 0)?

You can find the constants for resource_type_id and action_id here:
https://github.com/DSpace/DSpace/blob/dspace-3.1/dspace-api/src/main/java/org/dspace/core/Constants.java

Regards,
~~helix84

Compulsory reading: DSpace Mailing List Etiquette
https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and 
AppDynamics. Performance Central is your source for news, insights, 
analysis and resources for efficient Application Performance Management. 
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

Reply via email to