From: mka Date: Wed, 17 Apr 2013 11:53:21 +0000 (+0000) Subject: MarkAsReference and RemoveAsReference operations are improved. X-Git-Tag: Root_Delivery2_2013_04_22~22 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c854c617dfdec2ab20187885cf445b84e8eb4e2e;p=tools%2Fsiman.git MarkAsReference and RemoveAsReference operations are improved. --- diff --git a/Workspace/Siman-Common/src/org/splat/som/StudyRights.java b/Workspace/Siman-Common/src/org/splat/som/StudyRights.java index 58191aa..6b53d4f 100644 --- a/Workspace/Siman-Common/src/org/splat/som/StudyRights.java +++ b/Workspace/Siman-Common/src/org/splat/som/StudyRights.java @@ -168,7 +168,8 @@ public class StudyRights { * @return true/false. */ public boolean canMarkStudyAsReference() { - return (_operand.getProgressState() == ProgressState.APPROVED /* && "knowledgineer".equals(_user.getRole().getName()) */); + int roleIndex = _user.getRole().getName().indexOf("knowledgineer"); + return (_operand.getProgressState() == ProgressState.APPROVED && (roleIndex > -1)); } /** @@ -177,7 +178,8 @@ public class StudyRights { * @return true/false. */ public boolean canRemoveStudyAsReference() { - return (_operand.getProgressState() == ProgressState.TEMPLATE /* && "knowledgineer".equals(_user.getRole().getName()) */); + int roleIndex = _user.getRole().getName().indexOf("knowledgineer"); + return (_operand.getProgressState() == ProgressState.TEMPLATE && (roleIndex > -1)); } // ==========================================================================