return _author;
}
-/**
- * Checks if the user has right to move the study from the Private to the Public area of the repository.
- * Only the author of the study have such right.
- *
- * @return true if the user has right to edit the description.
- */
- public boolean canPublish () {
-// ----------------------------
- if (!_author) {
+ /**
+ * Checks if the user has right to move the study from the Private to the Public area of the repository. Only the author of the study
+ * have such right.
+ *
+ * @return true if the user has right to edit the description.
+ */
+ public boolean canPublish() {
+ // ----------------------------
+ if (_operand.getProgressState() == ProgressState.APPROVED
+ && !_operand.isPublic()/* && "knowledgineer".equals(_user.getRole().getName()) */) {
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * Checks if the user has right to move the study from the Public to the Private area of the repository. Only the author of the study
+ * have such right.
+ *
+ * @return true if the user has right to edit the description.
+ */
+ public boolean canProtect() {
+ // ----------------------------
+ if (_operand.getProgressState() == ProgressState.APPROVED
+ && _operand.isPublic()/* && "knowledgineer".equals(_user.getRole().getName()) */) {
+ return true;
+ }
return false;
}
- return (!_operand.isPublic());
- }
public boolean canPurge () {
// --------------------------