File tree Expand file tree Collapse file tree
src/main/java/edu/harvard/iq/dataverse Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77
88import edu .harvard .iq .dataverse .authorization .Permission ;
99import edu .harvard .iq .dataverse .authorization .groups .impl .builtin .AuthenticatedUsers ;
10+ import edu .harvard .iq .dataverse .authorization .users .GuestUser ;
1011import edu .harvard .iq .dataverse .authorization .users .User ;
1112import edu .harvard .iq .dataverse .engine .command .Command ;
1213import edu .harvard .iq .dataverse .engine .command .DataverseRequest ;
@@ -260,7 +261,7 @@ public boolean canIssueDeleteDatasetCommand(DvObject dvo){
260261 // PUBLISH DATASET
261262 public boolean canIssuePublishDatasetCommand (DvObject dvo ){
262263 User u = session .getUser ();
263- if (u == null ) {
264+ if (u == null || u instanceof GuestUser ) {
264265 return false ; // guests can not publish
265266 }
266267 if (u .isSuperuser ()) {
@@ -281,7 +282,7 @@ public boolean canIssuePublishDatasetCommand(DvObject dvo){
281282 // SUBMIT DATASET FOR REVIEW
282283 public boolean canIssueSubmitDatasetForReviewCommand (DvObject dvo ){
283284 User u = session .getUser ();
284- if (u == null ) {
285+ if (u == null || u instanceof GuestUser ) {
285286 return false ; // guests can not submit for review
286287 }
287288 // Return false if dataset has 0 files and user want to 'publish' or 'submit for review' and 'publish dataset requires files' flag is set
You can’t perform that action at this time.
0 commit comments