Hi! There may be a better solution solution but a way I was able to edit
multiple (thousands) of permission was querying the Database and get the
bitstreams with the groups associated to it and then with that information
UPDATE the required bitstreams:
So, with the following query I get the information necessary to identify
the items, bitstreams and groups. Have in mind that metadata_field_id = 64
is our metadata id for dc.title, yours may change.
SELECT
mtdte.dspace_object_id AS collectionUUID,
mtdte.text_value AS collectionName,
mtdtc.dspace_object_id AS itemUUID,
mtdtc.text_value AS itemName,
resourcepolicy.epersongroup_id AS grpUUID,
mtdtb.text_value AS grpName,
resourcepolicy.policy_id,
resourcepolicy.dspace_object AS bitstreamUUDI,
mtdta.text_value AS fileName
FROM
bitstream
JOIN
resourcepolicy
ON
resourcepolicy.dspace_object = bitstream.uuid
JOIN
metadatavalue mtdtb
ON
mtdtb.dspace_object_id = resourcepolicy.epersongroup_id
JOIN
bundle2bitstream
ON
bundle2bitstream.bitstream_id = bitstream.uuid
JOIN
metadatavalue mtdtd
ON
mtdtd.dspace_object_id = bundle2bitstream.bundle_id
JOIN
bundle
ON
bundle.uuid = bundle2bitstream.bundle_id
JOIN
item2bundle
ON
item2bundle.bundle_id = bundle.uuid
JOIN
metadatavalue mtdta
ON
mtdta.dspace_object_id = bitstream.uuid
JOIN
metadatavalue mtdtc
ON
mtdtc.dspace_object_id = item2bundle.item_id
JOIN
item
ON
item.uuid = mtdtc.dspace_object_id
JOIN
metadatavalue mtdte
ON
mtdte.dspace_object_id = item.owning_collection
WHERE
mtdtb.metadata_field_id = 64
AND
mtdta.metadata_field_id = 64
AND
mtdtc.metadata_field_id = 64
AND
mtdtd.metadata_field_id = 64
AND
mtdtd.text_value = 'ORIGINAL'
AND
mtdte.metadata_field_id = 64
Then I paste on excel the data and filter the collections that need to be
updated massively and with the resourcepolicy.policy_id, I update the group
associated to the file and if it is necessary I remove the values of
resourcepolicy.start_date and resourcepolicy.end_date.
*There may be a better way to do it, but this is a way I found.*
On Tuesday, March 19, 2019 at 12:29:09 PM UTC-5, Fillemon Silvanus wrote:
>
> My University have a lot of items and bit streams that are not readable by
> the group anonymous.I am requested to change the policy for all the items
> and bit streams to be readable to the group anonymous. I know of the way
> where i have to log in as admin and go to administrator and then access
> control, but i find this way time consuming because i have to change every
> collections items and bit streams one by one. I am hoping there is an easy
> way to change access rights for all items and bit streams once . Thank You
>
--
All messages to this mailing list should adhere to the DuraSpace Code of
Conduct: https://duraspace.org/about/policies/code-of-conduct/
---
You received this message because you are subscribed to the Google Groups
"DSpace Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/dspace-community.
For more options, visit https://groups.google.com/d/optout.