Hello, 

Thank you very much for the help. I've tried running a SELECT on your query 
for an item, first while it's public and then while it's private, but I see 
no change in values when switching between states. I believe the query may 
not be what I'm looking for.

After some investigation, I managed to set a test item as private from SQL 
using the following query:


*update item set discoverable = true where uuid = 
'c017ed8c-cbe7-4323-80cb-48a831453a39';*


*[image: Screenshot_6.png]*

 However, the item still appears as public (although labeled as "private") 
when searched for without being logged in. If I change the item's status to 
private from the user interface, it works correctly; meaning, when I search 
for it without being logged in, 
I cannot find it since it's private. There must be another SQL table I need 
to modify for the behavior I'm seeking. 

Thank you very much.

El lunes, 26 de febrero de 2024 a las 14:11:03 UTC+1, Matthias Letsch 
escribió:

> Hello Javi,
>
> Do you mean to make them only accessible to administrator? And do you 
> already have a list of the uuids of your items you want to make private? 
> (the long hash value which also appears in the url of an item).
>
> If so, and if you are somewhat familiar with SQL and the DSpace database, 
> I'd suggest you could make the changes directly via sql update in the 
> resourcepolicy table in your database.
>
> *Disclaimer: Please take this approach with a grain of salt and test it on 
> a single item first, preferably in your test environment / test database. I 
> don't know if there is a solution via the user interface, so this is what I 
> would do, but if someone knows a more simple and secure solution via the 
> user interface, I would also prefer the latter!*
>
> update resourcepolicy
> set rpname = 'administrator', rptype = 'TYPE_CUSTOM', epersongroup_id = 
> '*uuid 
> of your administrator group*' 
> where resource_type_id = 2 and action_id = 0 and dspace_object in (*comma 
> separated list of your uuids*)
>
> this changes the existing access policies of your items to your 
> administrator group only (you have to know the uuid of your administrator 
> group, too).
>
> If you are not yet able to identify your items exactly by uuid, it will be 
> a little more difficult, as you will then have to work across several 
> tables (item2bundle, bundle2bitstream) to find out which items do not have 
> bistreams. I can't go into this in detail at this point.
>
> Kind regards,
> Matthias
>
>
>
> Javi Rojo Díaz schrieb am Montag, 26. Februar 2024 um 10:27:50 UTC+1:
>
>> Good morning, 
>>
>> I wanted to ask if there is any way to set all DSpace items that do not 
>> have an associated file as private.
>>  
>> I know it's a bit of a stretch and I can't find information about it, but 
>> I would appreciate any help. Otherwise, I understand that I will have to do 
>> it manually, and there are about 700 items... 
>>
>> Thank you for your assistance. Best regards."
>>
>

-- 
All messages to this mailing list should adhere to the Code of Conduct: 
https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx
--- 
You received this message because you are subscribed to the Google Groups 
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dspace-tech+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dspace-tech/ca843616-b584-46ae-a44e-924013b3a1e4n%40googlegroups.com.

Reply via email to