Improving code

This commit is contained in:
Luca Frosini 2021-11-18 17:53:00 +01:00
parent bdbb954ba5
commit 25bf1ab1c5
1 changed files with 2 additions and 2 deletions

View File

@ -1005,7 +1005,7 @@ public class CKANPackage extends CKAN {
break;
case PENDING:
if(result.get(AUTHOR_EMAIL_KEY).asText().compareTo(portalUser.getEMail())==0) {
if(isItemCreator()) {
break;
}
if(portalUser.isCatalogueModerator()) {
@ -1014,7 +1014,7 @@ public class CKANPackage extends CKAN {
throw new ForbiddenException("You are not entitled to update a " + cmItemStatus.getValue() + " item");
case REJECTED:
if(result.get(AUTHOR_EMAIL_KEY).asText().compareTo(portalUser.getEMail())==0) {
if(isItemCreator()) {
break;
}
if(ckanUser.getRole() == Role.ADMIN || portalUser.isCatalogueModerator()) {