internal AclEditor SetPermission(int principalId, bool propagates, PermissionType permissionType, PermissionValue permissionValue) { var entry = GetEntry(principalId, propagates); var perm = GetSnPerm(entry, permissionType); uint allowBits; uint denyBits; entry.GetPermissionBits(out allowBits, out denyBits); PermissionBits.SetBits(ref allowBits, ref denyBits, permissionType, permissionValue); entry.SetPermissionsBits(allowBits, denyBits); return(this); }
internal void AddEntry(SnAccessControlEntry entry) { var newEntry = CreateEntry(entry.Identity.NodeId, entry.Propagates); uint allowBits, denyBits; entry.GetPermissionBits(out allowBits, out denyBits); PermissionBits.SetBits(ref allowBits, ref denyBits); newEntry.SetPermissionsBits(allowBits, denyBits); var list = acl.Entries.ToList(); list.Add(newEntry); acl.Entries = list.ToArray(); }