Improving code
This commit is contained in:
parent
bdbb954ba5
commit
25bf1ab1c5
|
@ -1005,7 +1005,7 @@ public class CKANPackage extends CKAN {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PENDING:
|
case PENDING:
|
||||||
if(result.get(AUTHOR_EMAIL_KEY).asText().compareTo(portalUser.getEMail())==0) {
|
if(isItemCreator()) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if(portalUser.isCatalogueModerator()) {
|
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");
|
throw new ForbiddenException("You are not entitled to update a " + cmItemStatus.getValue() + " item");
|
||||||
|
|
||||||
case REJECTED:
|
case REJECTED:
|
||||||
if(result.get(AUTHOR_EMAIL_KEY).asText().compareTo(portalUser.getEMail())==0) {
|
if(isItemCreator()) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if(ckanUser.getRole() == Role.ADMIN || portalUser.isCatalogueModerator()) {
|
if(ckanUser.getRole() == Role.ADMIN || portalUser.isCatalogueModerator()) {
|
||||||
|
|
Loading…
Reference in New Issue