diff --git a/mica-core/src/main/java/org/obiba/mica/access/service/DataAccessRequestUtilService.java b/mica-core/src/main/java/org/obiba/mica/access/service/DataAccessRequestUtilService.java index f9a7f474a1..3ecb9e3b4d 100644 --- a/mica-core/src/main/java/org/obiba/mica/access/service/DataAccessRequestUtilService.java +++ b/mica-core/src/main/java/org/obiba/mica/access/service/DataAccessRequestUtilService.java @@ -89,9 +89,10 @@ public void checkStatusTransition(DataAccessRequest request, DataAccessRequest.S */ public Iterable nextStatus(DataAccessRequest request) { List to = Lists.newArrayList(); + if (!subjectAclService.isPermitted("/data-access-request/" + request.getId(), "EDIT", "_status")) return to; switch(request.getStatus()) { case OPENED: - if (subjectAclService.isCurrentUser(request.getApplicant())) addNextOpenedStatus(to); + addNextOpenedStatus(to); break; case SUBMITTED: addNextSubmittedStatus(to); @@ -100,7 +101,7 @@ public Iterable nextStatus(DataAccessRequest request) addNextReviewedStatus(to); break; case CONDITIONALLY_APPROVED: - if (subjectAclService.isCurrentUser(request.getApplicant())) addNextConditionallyApprovedStatus(to); + addNextConditionallyApprovedStatus(to); break; case APPROVED: addNextApprovedStatus(to);