Skip to content

Commit c397418

Browse files
committed
allow superuser to publish dataset with 0 files
1 parent d0762e7 commit c397418

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/main/java/edu/harvard/iq/dataverse/PermissionsWrapper.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,10 @@ public boolean canIssueDeleteDatasetCommand(DvObject dvo){
254254

255255
// PUBLISH DATASET
256256
public boolean canIssuePublishDatasetCommand(DvObject dvo){
257+
User u = session.getUser();
258+
if (u != null && u.isSuperuser()) {
259+
return true;
260+
}
257261
// Return false if dataset has 0 files and user want to 'publish' or 'submit for review' and 'publish dataset requires files' flag is set
258262
if (dvo.isInstanceofDataset()) {
259263
Dataverse dv =((Dataset)dvo).getOwner();

0 commit comments

Comments
 (0)