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

Reply via email to