* @see Publication#accept()
*/
public boolean canAccept() {
- return _isauthor && _operand.isOutdated();
+ return _isauthor && ServiceLocatorImpl.getInstance()
+ .getPublicationService().canBeActualized(_operand);
}
/**
public boolean canApprove() {
User approver = _cycle.getActor(ValidationStep.APPROVAL); // May be null if not approvable
boolean res = (_user.equals(approver))
- && (_operand.getProgressState() == ProgressState.inCHECK);
+ && (_operand.getProgressState() == ProgressState.inCHECK)
+ && !_operand.isOutdated();
if (res) {
List<Relation> use = _operand.value().getRelations(
UsesRelation.class);
User manager = _operand.getOwnerStudy().getAuthor();
User publisher = _cycle.getActor(ValidationStep.PROMOTION); // Null if the default users are involved
+ if(_operand.isOutdated()) {
+ return false;
+ }
if (_operand.getProgressState() != ProgressState.inWORK) {
if (_operand.getProgressState() == ProgressState.inDRAFT) {
return canReview();
public boolean canReview() {
User reviewer = _cycle.getActor(ValidationStep.REVIEW); // May be null if not reviewable
- if (!_user.equals(reviewer)) {
+ if (!_user.equals(reviewer) || _operand.isOutdated()) {
return false;
}
if (_operand.getProgressState() != ProgressState.inDRAFT) {