[DS873] Creative commons license bundle on embargoed item will cause internal system errors on item pages.

git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@6643 9c30dcfa-912a-0410-8fc2-9e0234be79fd
This commit is contained in:
Robin Taylor
2011-09-04 08:35:23 +00:00
parent 2f0831b9f9
commit 9a6f0c0b49

View File

@@ -20,6 +20,7 @@ import org.dspace.content.Bundle;
import org.dspace.core.ConfigurationManager;
import org.dspace.core.Context;
import org.dspace.core.Constants;
import org.dspace.license.CreativeCommons;
/**
* Default plugin implementation of the embargo setting function.
@@ -82,7 +83,7 @@ public class DefaultEmbargoSetter implements EmbargoSetter
{
// 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)))
if (!(bnn.equals(Constants.LICENSE_BUNDLE_NAME) || bnn.equals(Constants.METADATA_BUNDLE_NAME) || bnn.equals(CreativeCommons.CC_BUNDLE_NAME)))
{
AuthorizeManager.removePoliciesActionFilter(context, bn, Constants.READ);
for (Bitstream bs : bn.getBitstreams())
@@ -106,7 +107,7 @@ public class DefaultEmbargoSetter implements EmbargoSetter
{
// 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)))
if (!(bnn.equals(Constants.LICENSE_BUNDLE_NAME) || bnn.equals(Constants.METADATA_BUNDLE_NAME) || bnn.equals(CreativeCommons.CC_BUNDLE_NAME)))
{
// don't report on "TEXT" or "THUMBNAIL" bundles; those
// can have READ long as the bitstreams in them do not.