예제 #1
0
파일: AclEditor.cs 프로젝트: kimduquan/DMIS
        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);
        }
예제 #2
0
파일: AclEditor.cs 프로젝트: kimduquan/DMIS
        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();
        }