From c854c617dfdec2ab20187885cf445b84e8eb4e2e Mon Sep 17 00:00:00 2001 From: mka Date: Wed, 17 Apr 2013 11:53:21 +0000 Subject: [PATCH] MarkAsReference and RemoveAsReference operations are improved. --- Workspace/Siman-Common/src/org/splat/som/StudyRights.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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)); } // ========================================================================== -- 2.39.2