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