Esempio n. 1
0
 public UserRoleDto(AccessControlListDto acl, string name, long id, bool canDelete)
 {
     Acl          = acl;
     Name         = name;
     Id           = id;
     CanBeDeleted = canDelete;
 }
Esempio n. 2
0
 public UserRoleDto(UserRoleDto role)
 {
     Name         = role.Name;
     CanBeDeleted = role.CanBeDeleted;
     Id           = role.Id;
     Acl          = new AccessControlListDto(role.Acl);
 }
 public AccessControlListDto(AccessControlListDto acl) : this()
 {
     foreach (AccessControlEntryDto item in acl.Entries)
     {
         Entries.Add(new AccessControlEntryDto(item));
     }
 }
 public bool DiffersFrom(AccessControlListDto list)
 {
     if (list.Entries.Count != this.Entries.Count)
     {
         return(true);
     }
     foreach (AccessControlEntryDto thisEntry in Entries)
     {
         AccessControlEntryDto entry = list.Entries.FirstOrDefault(e => e.Id == thisEntry.Id);
         if (entry == null)
         {
             return(true);
         }
         if (thisEntry.DiffersFrom(entry))
         {
             return(true);
         }
     }
     return(false);
 }
Esempio n. 5
0
 public UserRoleDto()
 {
     Acl = new AccessControlListDto();
 }