Ejemplo n.º 1
0
 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;
 }
Ejemplo n.º 2
0
 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;
 }
Ejemplo n.º 4
0
 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;
 }