Skip to content

Commit

Permalink
Merge branch 'develop' into 8129-harvesting #8129
Browse files Browse the repository at this point in the history
  • Loading branch information
pdurbin committed Aug 5, 2024
2 parents a9f7d79 + ff26ae8 commit a4f98de
Show file tree
Hide file tree
Showing 3 changed files with 200 additions and 89 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@

import edu.harvard.iq.dataverse.Dataset;
import edu.harvard.iq.dataverse.DatasetLinkingDataverse;
import edu.harvard.iq.dataverse.DatasetLock;
import edu.harvard.iq.dataverse.Dataverse;
import edu.harvard.iq.dataverse.Guestbook;
import edu.harvard.iq.dataverse.authorization.DataverseRole;
import edu.harvard.iq.dataverse.authorization.Permission;
import edu.harvard.iq.dataverse.authorization.users.AuthenticatedUser;
import edu.harvard.iq.dataverse.engine.command.AbstractVoidCommand;
Expand Down Expand Up @@ -135,7 +137,14 @@ public void executeImpl(CommandContext ctxt) throws CommandException {
}
throw new UnforcedCommandException(errorString.toString(), this);
}


// 6575 if dataset is submitted for review and the default contributor
// role includes dataset publish then remove the lock

if (moved.isLockedFor(DatasetLock.Reason.InReview)
&& destination.getDefaultContributorRole().permissions().contains(Permission.PublishDataset)) {
ctxt.datasets().removeDatasetLocks(moved, DatasetLock.Reason.InReview);
}

// OK, move
moved.setOwner(destination);
Expand Down
Loading

0 comments on commit a4f98de

Please sign in to comment.