From: mka Date: Wed, 17 Apr 2013 13:08:38 +0000 (+0000) Subject: canPublish and canProtect operations are improved. X-Git-Tag: Root_Delivery2_2013_04_22~21 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=cf56167c6fd6b4793d7a9a52727a1e918e94c0cb;p=tools%2Fsiman.git canPublish and canProtect 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 6b53d4f..2eeff0e 100644 --- a/Workspace/Siman-Common/src/org/splat/som/StudyRights.java +++ b/Workspace/Siman-Common/src/org/splat/som/StudyRights.java @@ -116,8 +116,9 @@ public class StudyRights { * @return true if the user has right to edit the description. */ public boolean canPublish() { + int roleIndex = _user.getRole().getName().indexOf("knowledgineer"); return (_operand.getProgressState() == ProgressState.APPROVED && !_operand - .isPublic()/* && "knowledgineer".equals(_user.getRole().getName()) */); + .isPublic() && (roleIndex > -1)); } /** @@ -127,8 +128,9 @@ public class StudyRights { * @return true if the user has right to edit the description. */ public boolean canProtect() { + int roleIndex = _user.getRole().getName().indexOf("knowledgineer"); return (_operand.getProgressState() == ProgressState.APPROVED && _operand - .isPublic()/* && "knowledgineer".equals(_user.getRole().getName()) */); + .isPublic() && (roleIndex > -1)); } /**