Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
        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; }));
        }
Exemplo n.º 4
0
        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; }));
        }
Exemplo n.º 5
0
 public RmSSoD GetSSoDById(string objectId, string[] attributes)
 {
     return(Base_GetResourceById(RmSSoD.StaticResourceType(), objectId, attributes) as RmSSoD);
 }
Exemplo n.º 6
0
 public RmSSoD GetSSoDByDisplayName(string displayName, string[] attributes)
 {
     return(Base_GetResourceByDisplayName(RmSSoD.StaticResourceType(), displayName, attributes) as RmSSoD);
 }
Exemplo n.º 7
0
        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; }));
        }