mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-07 01:54:22 +00:00
Merge pull request #2047 from kshepherd/ds-2862_fix_legacy_embargo_checks_master_port
[DS-2862] Apply DSPR#2000 changes manually and fix style for master port
This commit is contained in:
@@ -168,20 +168,24 @@ public class DefaultEmbargoSetter implements EmbargoSetter {
|
||||
// check for ANY read policies and report them:
|
||||
for (ResourcePolicy rp : getAuthorizeService()
|
||||
.getPoliciesActionFilter(context, bn, Constants.READ)) {
|
||||
System.out.println("CHECK WARNING: Item " + item.getHandle() + ", Bundle " + bn
|
||||
.getName() + " allows READ by " +
|
||||
((rp.getEPerson() != null) ? "Group " + rp.getGroup().getName() :
|
||||
"EPerson " + rp.getEPerson().getFullName()));
|
||||
if (rp.getStartDate() == null) {
|
||||
System.out.println("CHECK WARNING: Item " + item.getHandle() + ", Bundle " + bn
|
||||
.getName() + " allows READ by " +
|
||||
((rp.getEPerson() != null) ? "Group " + rp.getGroup().getName() :
|
||||
"EPerson " + rp.getEPerson().getFullName()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (Bitstream bs : bn.getBitstreams()) {
|
||||
for (ResourcePolicy rp : getAuthorizeService()
|
||||
.getPoliciesActionFilter(context, bs, Constants.READ)) {
|
||||
System.out.println("CHECK WARNING: Item " + item.getHandle() + ", Bitstream " + bs
|
||||
.getName() + " (in Bundle " + bn.getName() + ") allows READ by " +
|
||||
((rp.getEPerson() != null) ? "Group " + rp.getGroup().getName() :
|
||||
"EPerson " + rp.getEPerson().getFullName()));
|
||||
if (rp.getStartDate() == null) {
|
||||
System.out.println("CHECK WARNING: Item " + item.getHandle() + ", Bitstream " + bs
|
||||
.getName() + " (in Bundle " + bn.getName() + ") allows READ by " +
|
||||
((rp.getEPerson() != null) ? "Group " + rp.getGroup().getName() :
|
||||
"EPerson " + rp.getEPerson().getFullName()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -147,8 +147,9 @@ public class EmbargoServiceImpl implements EmbargoService {
|
||||
@Override
|
||||
public void liftEmbargo(Context context, Item item)
|
||||
throws SQLException, AuthorizeException, IOException {
|
||||
// new version of Embargo policies remain in place.
|
||||
//lifter.liftEmbargo(context, item);
|
||||
// Since 3.0 the lift process for all embargoes is performed through the dates
|
||||
// on the authorization process (see DS-2588)
|
||||
// lifter.liftEmbargo(context, item);
|
||||
itemService.clearMetadata(context, item, lift_schema, lift_element, lift_qualifier, Item.ANY);
|
||||
|
||||
// set the dc.date.available value to right now
|
||||
|
Reference in New Issue
Block a user