]> SALOME platform Git repositories - tools/siman.git/blobdiff - Workspace/Siman-Common/src/org/splat/som/StudyRights.java
Salome HOME
Remove the scenario functionality is implemented
[tools/siman.git] / Workspace / Siman-Common / src / org / splat / som / StudyRights.java
index 62c0a1e1bb7e90e226892a9993f87b24b1eb64db..e869784cefaf14a89a618f5f48c5d58495d1a48d 100644 (file)
@@ -152,6 +152,17 @@ public class StudyRights {
                                .getProgressState() == ProgressState.inDRAFT)
                                && _isauthor;
        }
+       
+       /**
+        * Check if the user can remove the selected scenario.
+        * 
+        * @return true if the user can remove the scenario
+        */
+       public boolean canRemoveScenario() {
+               return (_operand.getProgressState() == ProgressState.inWORK 
+                       || _operand.getProgressState() == ProgressState.inDRAFT)
+                       && _isauthor && _operand.getScenariiList().size() > 1;
+       }
 
        /**
         * Check if the user can version the study.