예제 #1
0
        public override RoleAssignments GetRoleAssignments(string uniqueName)
        {
            XmlRoleAssignments r = new XmlRoleAssignments();

            r.Load(uniqueName);

            return(new RoleAssignments(r));
        }
예제 #2
0
        public override IEnumerator <RoleAssignments> GetRoleAssignmentsCollection(IEnumerable <string> uniqueNames, Application application)
        {
            foreach (var item in FindElements(uniqueNames))
            {
                XmlRoleAssignments r = new XmlRoleAssignments();
                r.Load(item);

                yield return(new RoleAssignments(r, application));
            }
        }
예제 #3
0
        protected override void LoadInternal(XmlElement element)
        {
            base.LoadInternal(element);
            ApplicationVersion = GetAttribute(element, APPLICATIONVERSION);

            Groups          = new Collections.ApplicationGroupCollection(XmlApplicationGroup.GetChildren(element), false);
            Operations      = new Collections.OperationCollection(XmlOperation.GetChildren(element), false);
            Tasks           = new Collections.TaskCollection(XmlTask.GetTasks(element), false);
            Roles           = new Collections.RoleDefinitionCollection(XmlRoleDefinition.GetRoles(element), false);
            RoleAssignments = new Collections.RoleAssignmentsCollection(XmlRoleAssignments.GetChildren(element));
        }
예제 #4
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));
        }