Thanks for the response, Stuart. That is what I was thinking. I had also
added a DEFAULT_BITSTREAM_READ policy on the collection for administrators,
and I was still able to view embargoed items when logged in as an
administrator. This led me to believe that not all READ permissions were not
being removed from the bitstreams.
I will try your suggestion. In any case, this approach will give us more
control.
Thanks again!
-- Dave
On Thu, Mar 11, 2010 at 3:08 PM, Stuart Lewis <[email protected]>wrote:
> Hi Dave,
>
> > I am attempting to use the Embargo feature on a subset of items within a
> collection. I am able to successfully set the embargo on the desired items,
> but I am having difficulty allowing users that are IPAuthenticated to access
> the bitstreams. Is this expected behavior, or am I likely doing something
> wrong?
>
> The rules in the DefaultEmbargoSetter are to remove all READ permissions
> from the bitstreams:
>
> /**
> * Enforce embargo by turning off all read access to bitstreams in
> * this Item.
> *
> * @param context the DSpace context
> * @param item the item to embargo
> */
> public void setEmbargo(Context context, Item item)
> throws SQLException, AuthorizeException, IOException
> {
> for (Bundle bn : item.getBundles())
> {
> // Skip the LICENSE and METADATA bundles, they stay
> world-readable
> String bnn = bn.getName();
> if (!(bnn.equals(Constants.LICENSE_BUNDLE_NAME) ||
> bnn.equals(Constants.METADATA_BUNDLE_NAME)))
> {
> AuthorizeManager.removePoliciesActionFilter(context, bn,
> Constants.READ);
> for (Bitstream bs : bn.getBitstreams())
> {
> AuthorizeManager.removePoliciesActionFilter(context, bs,
> Constants.READ);
> }
> }
> }
> }
>
> If you want different behaviour, such as only remove anonymous READ
> permissions from the bitstreams, then you'll need to create your own class
> that implements the EmbargoSetter interface, or extend the
> DefaultEmbargoSetter class and override the setEmbargo method.
>
> I hope this helps,
>
>
> Stuart Lewis
> IT Innovations Analyst and Developer
> Te Tumu Herenga The University of Auckland Library
> Auckland Mail Centre, Private Bag 92019, Auckland 1142, New Zealand
> Ph: 64 9 373-7599 x81928
> http://www.library.auckland.ac.nz/
>
>
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Dspace-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-devel