User approver = _cycle.getActor(ValidationStep.APPROVAL); // May be null if not approvable
ProgressState mystate = _operand.value().getProgressState();
- boolean res = (((mystate != ProgressState.inDRAFT || publisher != null
- || _isauthor || _user.equals(manager))
- && (publisher == null || _user.equals(publisher)) || _user
- .equals(reviewer))
-
- && (mystate != ProgressState.inCHECK
-
- || ((approver == null || _user.equals(approver) || _user
- .equals(reviewer))
-
- && (approver != null || _user.equals(publisher) || (reviewer == null || _user
- .equals(reviewer))
- && (reviewer != null || _user.equals(manager)))))
-
- && (mystate == ProgressState.inCHECK || mystate == ProgressState.inDRAFT));
+ boolean res = (mystate == ProgressState.inDRAFT
+ && (_user.equals(publisher) || _user.equals(reviewer)
+ || _user.equals(manager) || (reviewer == null)
+ && _user.equals(approver)) || mystate == ProgressState.inCHECK
+ && (_user.equals(approver) || _user.equals(reviewer) || (reviewer == null)
+ && (_user.equals(publisher) || _user.equals(manager))));
if (res) {
List<Relation> use = _operand.value().getRelations(
User approver = _cycle.getActor(ValidationStep.APPROVAL); // May be null if not approvable
ProgressState mystate = _operand.getProgressState();
- boolean res = (((mystate != ProgressState.inDRAFT || publisher != null
- || _isauthor || _user.equals(manager))
- && (publisher == null || _user.equals(publisher)) || _user
- .equals(reviewer))
-
- && (mystate != ProgressState.inCHECK
-
- || ((approver == null || _user.equals(approver) || _user
- .equals(reviewer))
-
- && (approver != null || _user.equals(publisher) || (reviewer == null || _user
- .equals(reviewer))
- && (reviewer != null || _user.equals(manager)))))
-
- && (mystate == ProgressState.inCHECK || mystate == ProgressState.inDRAFT));
+ boolean res = (mystate == ProgressState.inDRAFT
+ && (_user.equals(publisher) || _user.equals(reviewer)
+ || _user.equals(manager) || (reviewer == null)
+ && _user.equals(approver)) || mystate == ProgressState.inCHECK
+ && (_user.equals(approver) || _user.equals(reviewer) || (reviewer == null)
+ && (_user.equals(publisher) || _user.equals(manager))));
return res;
}