Restricting Items - OregonDigital/oregondigital GitHub Wiki

This is TEMPORARY until https://github.com/OregonDigital/oregondigital/issues/657 is closed

Make sure appropriate roles exist

Add a new role or IP range to the "Roles" interface if appropriate.

Use the Rails console to remove "public" from read_groups on an item.

This work will be undone after the item is reviewed and will have to be repeated - reviewing makes an item "public"

i = ActiveFedora::Base.find(pid).adapt_to_cmodel
i.read_groups = i.read_groups - ["public"]
i.read_groups |= ["University-of-Oregon"] # Appropriate role from Roles interface.
i.save

That should be it!