public List <string> GetConfilctRoles(RmOrgUnit ou) { List <string> retVal = new List <string>(); if (ou.RoleRefList == null) { return(retVal); } List <string> ouRoleList = new List <string>(); foreach (RmReference role in ou.RoleRefList) { ouRoleList.Add(role.Value); } foreach (RmSSoD ssod in Base_GetResourceByAttribute(RmSSoD.StaticResourceType(), RmSSoD.AttributeNames.Enabled.Name, "true", ResourceControl.OperationType.Opration_Is, new string[] { RmResource.AttributeNames.DisplayName.Name, RmSSoD.AttributeNames.RejectionRefs.Name })) { List <string> potentialConflictList = new List <string>(); foreach (RmReference rejectedRef in ssod.RejectionRefs) { if (ouRoleList.Contains(rejectedRef.Value)) { if (!potentialConflictList.Contains(rejectedRef.Value)) { potentialConflictList.Add(rejectedRef.Value); } } } if (potentialConflictList.Count > 1) { string conflict = ssod.ObjectID.Value + ":"; foreach (string conflictRole in potentialConflictList) { if (conflict == ssod.ObjectID.Value + ":") { conflict += conflictRole; } else { conflict = conflict + "|" + conflictRole; } } if (!retVal.Contains(conflict)) { retVal.Add(conflict); } } } return(retVal); }
public List <string> GetConflictRoles(RmRole role) { List <string> retVal = new List <string>(); if (role.ObjectID == null) { return(retVal); } foreach (RmSSoD ssod in Base_GetResourceByAttribute(RmSSoD.StaticResourceType(), RmSSoD.AttributeNames.RejectionRefs.Name, role.ObjectID.Value, OperationType.Opration_Is, new string[] { RmResource.AttributeNames.ObjectID.Name, RmResource.AttributeNames.DisplayName.Name, RmSSoD.AttributeNames.RejectionRefs.Name })) { string roleIDString = ssod.ObjectID.Value + ":"; foreach (RmReference roleRef in ssod.RejectionRefs) { if (roleIDString == (ssod.ObjectID.Value + ":")) { roleIDString = roleIDString + roleRef.Value; } else { roleIDString = roleIDString + "|" + roleRef.Value; } } if (!retVal.Contains(roleIDString)) { retVal.Add(roleIDString); } } return(retVal); }
public List <RmSSoD> GetSSoDByQuery(string query, string[] attributes) { List <RmResource> resourceList = Base_GetResourceByQuery(RmSSoD.StaticResourceType(), query, attributes); return(resourceList.ConvertAll <RmSSoD>(delegate(RmResource r) { return r as RmSSoD; })); }
public List <RmSSoD> GetSSoDByAttribute(string attributeName, string value, OperationType operation, string[] attributes) { List <RmResource> resourceList = Base_GetResourceByAttribute(RmSSoD.StaticResourceType(), attributeName, value, operation, attributes); return(resourceList.ConvertAll <RmSSoD>(delegate(RmResource r) { return r as RmSSoD; })); }
public RmSSoD GetSSoDById(string objectId, string[] attributes) { return(Base_GetResourceById(RmSSoD.StaticResourceType(), objectId, attributes) as RmSSoD); }
public RmSSoD GetSSoDByDisplayName(string displayName, string[] attributes) { return(Base_GetResourceByDisplayName(RmSSoD.StaticResourceType(), displayName, attributes) as RmSSoD); }
public List <RmSSoD> GetAllSSoD(string[] attributes) { List <RmResource> resourceList = Base_GetAllResource(RmSSoD.StaticResourceType(), attributes); return(resourceList.ConvertAll <RmSSoD>(delegate(RmResource r) { return r as RmSSoD; })); }