public bool AllowEditDocument(WorkflowAllowEditAndSubmitInput input) { if (input.DocumentStatus != Enums.DocumentStatus.Draft && input.DocumentStatus != Enums.DocumentStatus.Rejected) { return(false); } if (input.CreatedUser != input.CurrentUser) { return(_poaDelegationServices.IsDelegatedUserByUserAndDate(input.CreatedUser, input.CurrentUser, DateTime.Now)); } return(true); }
public bool AllowEditDocumentPbck1(WorkflowAllowEditAndSubmitInput input) { bool allowUser = true; if (input.CreatedUser != input.CurrentUser) { allowUser = _poaDelegationServices.IsDelegatedUserByUserAndDate(input.CreatedUser, input.CurrentUser, DateTime.Now); } if ((input.DocumentStatus == Enums.DocumentStatus.Rejected || input.DocumentStatus == Enums.DocumentStatus.Draft || input.DocumentStatus == Enums.DocumentStatus.WaitingGovApproval || input.DocumentStatus == Enums.DocumentStatus.GovRejected) && allowUser) { return(true); } return(false); }