Пример #1
0
        public RoleAssignments CreateRoleAssignments(string parent, string name, string description, RoleDefinition role)
        {
            XmlRoleAssignments r = new XmlRoleAssignments();

            r.Key         = System.Guid.NewGuid().ToString();
            r.Name        = name;
            r.Description = description;
            r.Definition  = role;

            r.Groups = new Collections.ApplicationGroupCollection(true);

            XmlElement thisNode = _Service.Load(parent);

            _Service.Save(r.ToXml(thisNode));

            return(new RoleAssignments(r));
        }