]> SALOME platform Git repositories - tools/siman.git/blobdiff - Workspace/Siman-Common/src/org/splat/som/StudyRights.java
Salome HOME
canPublish and canProtect operations are improved.
[tools/siman.git] / Workspace / Siman-Common / src / org / splat / som / StudyRights.java
index 6b53d4fe36aa337e7f8034479499071b1e014f98..2eeff0ef1ed66a88f1c7476d461a9ed039b64648 100644 (file)
@@ -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));
        }
 
        /**