public List <string> GetPermissionGroupBackLink(RmGroup group) { List <string> retVal = new List <string>(); foreach (RmRole role in Base_GetResourceByAttribute(RmRole.StaticResourceType(), RmRole.AttributeNames.PremissionRefs.Name, group.ObjectID.Value, OperationType.Opration_Is, new string[] { RmResource.AttributeNames.ObjectID.Name })) { if (role != null) { foreach (RmPerson person in Base_GetResourceByAttribute(RmPerson.StaticResourceType(), RmPerson.AttributeNames.RoleRefList.Name, role.ObjectID.Value, OperationType.Opration_Is, new string[] { RmResource.AttributeNames.ObjectID.Name })) { if (person != null) { if (!retVal.Contains(person.ObjectID.Value)) { retVal.Add(person.ObjectID.Value); } } } } } return(retVal); }
public RmResource GetGroupDisplayedOwner(RmGroup group, string[] attributes) { RmPerson person = Base_GetResourceById(RmPerson.StaticResourceType(), group.DisplayedOwner.Value, attributes) as RmPerson; if (person != null) { return(person); } return(Base_GetResourceById(RmGroup.StaticResourceType(), group.DisplayedOwner.Value, attributes)); }
public RmPerson GetPersonByDomainAccount(string domainAccount, string[] attributes) { string[] da = domainAccount.Split(@"\".ToCharArray(), StringSplitOptions.RemoveEmptyEntries); if (da.Length != 2) { return(null); } string filter = string.Format("[{0}='{1}' and {2}='{3}']", RmPerson.AttributeNames.Domain.Name, da[0], RmPerson.AttributeNames.AccountName.Name, da[1]); foreach (RmPerson person in Base_GetResourceByQuery(RmPerson.StaticResourceType(), filter, attributes)) { return(person); } return(null); }
public List <RmResource> GetGroupExplicitMembers(RmGroup group, string[] attributes) { List <RmResource> retVal = new List <RmResource>(); foreach (RmReference memberRef in group.ExplicitMember) { RmPerson person = Base_GetResourceById(RmPerson.StaticResourceType(), memberRef.Value, attributes) as RmPerson; if (person != null) { retVal.Add(person); continue; } RmGroup gp = Base_GetResourceById(RmGroup.StaticResourceType(), memberRef.Value, attributes) as RmGroup; if (gp != null) { retVal.Add(gp); } } return(retVal); }
public List <RmPerson> GetPersonByQuery(string query, string[] attributes) { List <RmResource> resourceList = Base_GetResourceByQuery(RmPerson.StaticResourceType(), query, attributes); return(resourceList.ConvertAll <RmPerson>(delegate(RmResource r) { return r as RmPerson; })); }
public List <RmPerson> GetPersonByAttribute(string attributeName, string value, OperationType operation, string[] attributes) { List <RmResource> resourceList = Base_GetResourceByAttribute(RmPerson.StaticResourceType(), attributeName, value, operation, attributes); return(resourceList.ConvertAll <RmPerson>(delegate(RmResource r) { return r as RmPerson; })); }
public RmPerson GetPersonById(string objectId, string[] attributes) { return(Base_GetResourceById(RmPerson.StaticResourceType(), objectId, attributes) as RmPerson); }
public RmPerson GetPersonByDisplayName(string displayName, string[] attributes) { return(Base_GetResourceByDisplayName(RmPerson.StaticResourceType(), displayName, attributes) as RmPerson); }
public List <RmPerson> GetAllPerson(string[] attributes) { List <RmResource> resourceList = Base_GetAllResource(RmPerson.StaticResourceType(), attributes); return(resourceList.ConvertAll <RmPerson>(delegate(RmResource r) { return r as RmPerson; })); }