@Override public boolean canReload(Document document, Person user) { DocumentRequestAuthorizationCache.WorkflowDocumentInfo workflowDocumentInfo = getDocumentRequestAuthorizationCache(document).getWorkflowDocumentInfo(); return canEdit(document, user) && !workflowDocumentInfo.isInitiated() || workflowDocumentInfo.isCanceled(); }
protected boolean isAuthorizedToRejectProposal(Document document, Person user) { final ProposalDevelopmentDocument pdDocument = ((ProposalDevelopmentDocument) document); DocumentRequestAuthorizationCache.WorkflowDocumentInfo workflowDocumentInfo = getDocumentRequestAuthorizationCache(document).getWorkflowDocumentInfo(); return ((!workflowDocumentInfo.isCompletionRequested() && workflowDocumentInfo.isApprovalRequested()) || canReject(user)) && !getKcDocumentRejectionService() .isDocumentOnInitialNode(pdDocument.getDocumentHeader().getWorkflowDocument()) && workflowDocumentInfo.isEnroute(); }