X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=Workspace%2FSiman-Common%2Fsrc%2Forg%2Fsplat%2Fsom%2FStudyRights.java;fp=Workspace%2FSiman-Common%2Fsrc%2Forg%2Fsplat%2Fsom%2FStudyRights.java;h=ac98a65ae93aec26ed1a2a5f8eec91ca00a0af74;hb=c4c0b1dd47eaeb8483cc64a57a3a9cb7f7d44e9e;hp=8782dab987bea5869b1380af0bc4f6c62b897cee;hpb=acd06fb2d835d2fbceffb054a547e014172fc9c9;p=tools%2Fsiman.git diff --git a/Workspace/Siman-Common/src/org/splat/som/StudyRights.java b/Workspace/Siman-Common/src/org/splat/som/StudyRights.java index 8782dab..ac98a65 100644 --- a/Workspace/Siman-Common/src/org/splat/som/StudyRights.java +++ b/Workspace/Siman-Common/src/org/splat/som/StudyRights.java @@ -216,24 +216,23 @@ public class StudyRights { User approver = _cycle.getActor(ValidationStep.APPROVAL); // May be null if not approvable ProgressState mystate = _operand.getProgressState(); - if (mystate == ProgressState.inDRAFT) { - if (publisher == null) { - if ((!_isauthor) && (!_user.equals(manager)) - && (!_user.equals(reviewer))) { - return false; - } - } else if ((!_user.equals(publisher)) && (!_user.equals(reviewer))) { - return false; - } - } else if (mystate == ProgressState.inCHECK) { - if (!_user.equals(approver)) { - return false; - } - } else { - return false; - } + boolean res = (((mystate != ProgressState.inDRAFT || publisher != null + || _isauthor || _user.equals(manager)) + && (publisher == null || _user.equals(publisher)) || _user + .equals(reviewer)) + + && (mystate != ProgressState.inCHECK + + || ((approver == null || _user.equals(approver) || _user + .equals(reviewer)) - return true; + && (approver != null || _user.equals(publisher) || (reviewer == null || _user + .equals(reviewer)) + && (reviewer != null || _user.equals(manager))))) + + && (mystate == ProgressState.inCHECK || mystate == ProgressState.inDRAFT)); + + return res; } /**