示例#1
0
        public Permission AddEntry(PermissionSecurityPrincipal securityPrincipal, PermissionLevel initialPermissionLevel)
        {
            if (!EnumValidator <PermissionLevel> .IsMemberOf(initialPermissionLevel, PermissionSet.ValidPermissionLevelForAddEntry))
            {
                throw new EnumOutOfRangeException("initialPermissionLevel", ServerStrings.BadEnumValue(typeof(PermissionLevel)));
            }
            Permission permission = this.PermissionTable.AddEntry(securityPrincipal, MemberRights.None);

            permission.PermissionLevel = initialPermissionLevel;
            return(permission);
        }