public UserRoleDto(AccessControlListDto acl, string name, long id, bool canDelete) { Acl = acl; Name = name; Id = id; CanBeDeleted = canDelete; }
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); }
public UserRoleDto() { Acl = new AccessControlListDto(); }