mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-09 19:13:18 +00:00
[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:
@@ -20,6 +20,7 @@ import org.dspace.content.Bundle;
|
|||||||
import org.dspace.core.ConfigurationManager;
|
import org.dspace.core.ConfigurationManager;
|
||||||
import org.dspace.core.Context;
|
import org.dspace.core.Context;
|
||||||
import org.dspace.core.Constants;
|
import org.dspace.core.Constants;
|
||||||
|
import org.dspace.license.CreativeCommons;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Default plugin implementation of the embargo setting function.
|
* 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
|
// Skip the LICENSE and METADATA bundles, they stay world-readable
|
||||||
String bnn = bn.getName();
|
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);
|
AuthorizeManager.removePoliciesActionFilter(context, bn, Constants.READ);
|
||||||
for (Bitstream bs : bn.getBitstreams())
|
for (Bitstream bs : bn.getBitstreams())
|
||||||
@@ -106,7 +107,7 @@ public class DefaultEmbargoSetter implements EmbargoSetter
|
|||||||
{
|
{
|
||||||
// Skip the LICENSE and METADATA bundles, they stay world-readable
|
// Skip the LICENSE and METADATA bundles, they stay world-readable
|
||||||
String bnn = bn.getName();
|
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
|
// don't report on "TEXT" or "THUMBNAIL" bundles; those
|
||||||
// can have READ long as the bitstreams in them do not.
|
// can have READ long as the bitstreams in them do not.
|
||||||
|
Reference in New Issue
Block a user