]> SALOME platform Git repositories - tools/siman.git/commitdiff
Salome HOME
canPublish and canProtect operations are improved.
authormka <mka@opencascade.com>
Wed, 17 Apr 2013 13:08:38 +0000 (13:08 +0000)
committermka <mka@opencascade.com>
Wed, 17 Apr 2013 13:08:38 +0000 (13:08 +0000)
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));
        }
 
        /**