public void UpdatePermission(dtoGenericPermission generic, long count) { AllowDelete = generic.AllowDelete && Deleted != BaseStatusDeleted.None; AllowVirtualDelete = Deleted == BaseStatusDeleted.None && generic.AllowVirtualDelete && !(count > 0); AllowUnDelete = Deleted != BaseStatusDeleted.None && generic.AllowUnDelete; AllowEdit = Deleted == BaseStatusDeleted.None && !(count > 0) && generic.AllowEdit; SubmissionCount = count; }
public dtoAttachmentFilePermission(dtoAttachmentFile attachment, dtoGenericPermission generic, long count) : base(attachment.Id) { Attachment = attachment; Deleted = attachment.Deleted; AllowDelete = generic.AllowDelete && Deleted != BaseStatusDeleted.None; AllowVirtualDelete = Deleted == BaseStatusDeleted.None && generic.AllowVirtualDelete && !(count > 0); AllowUnDelete = Deleted != BaseStatusDeleted.None && generic.AllowUnDelete; SubmissionCount = count; }
public dtoSubmitterTypePermission(dtoSubmitterType submitter, dtoGenericPermission generic, long count) : base(submitter.Id) { Submitter = submitter; Deleted = submitter.Deleted; AllowDelete = generic.AllowDelete && Deleted != BaseStatusDeleted.None; AllowVirtualDelete = (Deleted == BaseStatusDeleted.None && generic.AllowVirtualDelete && !(count > 0)); AllowUnDelete = Deleted != BaseStatusDeleted.None && generic.AllowUnDelete; AllowEdit = (Deleted == BaseStatusDeleted.None && generic.AllowEdit); SubmissionCount = count; }
public dtoRequestedFilePermission(dtoCallRequestedFile file, dtoGenericPermission generic, long count) : base(file.Id) { File = file; Deleted = file.Deleted; AllowDelete = generic.AllowDelete && Deleted != BaseStatusDeleted.None; AllowVirtualDelete = Deleted == BaseStatusDeleted.None && generic.AllowVirtualDelete && !(count > 0); AllowUnDelete = Deleted != BaseStatusDeleted.None && generic.AllowUnDelete; AllowEdit = Deleted == BaseStatusDeleted.None && !(count > 0) && generic.AllowEdit; SubmissionCount = count; }