* @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));
}
/**
* @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));
}
// ==========================================================================