コード例 #1
0
ファイル: CiscoRoleProvider.cs プロジェクト: gnomix/T.A.L.K.
        public override string[] GetUsersInRole(string roleName)
        {
            string[]      result   = null;
            List <string> userList = new List <string>();

            try
            {
                NameAndGUIDRequest userGroupReq = new NameAndGUIDRequest();
                userGroupReq.ItemElementName = ItemChoiceType61.name;
                userGroupReq.Item            = roleName;
                GetUserGroupRes res = _axlService.getUserGroup(userGroupReq);
                if (res != null && res.@return != null && [email protected] != null)
                {
                    foreach (XUserGroupMember member in [email protected])
                    {
                        userList.Add(member.Item.ToString());
                    }
                }
            }
            catch (Exception getGroupException)
            {
                log.Error("Impossible de récupérer la liste des utilisateurs appartenants au groupe " + roleName + ": " + getGroupException.ToString());
            }
            if (userList != null)
            {
                result = userList.ToArray();
            }
            return(result);
        }
コード例 #2
0
        /*
         * Remove API with name mentioned
         *
         *  Simple callRemovePhone request  with mandatory tags
         * ##Values in the method are hardcoded please modify accordingly to make it work###
         */
        private static void callRemovePhone(AXLAPIService axlApiService)
        {
            NameAndGUIDRequest removePhoneReq = new NameAndGUIDRequest();

            removePhoneReq.ItemElementName = ItemChoiceType32.name;
            removePhoneReq.Item            = "SEP170000100002";
            axlApiService.removePhone(removePhoneReq);
        }
コード例 #3
0
ファイル: CiscoRoleProvider.cs プロジェクト: gnomix/T.A.L.K.
        public override bool RoleExists(string roleName)
        {
            bool result = false;

            try
            {
                NameAndGUIDRequest userGroupReq = new NameAndGUIDRequest();
                userGroupReq.ItemElementName = ItemChoiceType61.name;
                userGroupReq.Item            = roleName;
                GetUserGroupRes res = _axlService.getUserGroup(userGroupReq);
                if (res != null && res.@return != null && [email protected] != null)
                {
                    result = true;
                }
            }
            catch (Exception roleExistsException)
            {
                log.Error("Impossible de savoir si le role " + roleName + " existe: " + roleExistsException.ToString());
            }
            return(result);
        }
コード例 #4
0
ファイル: CiscoRoleProvider.cs プロジェクト: gnomix/T.A.L.K.
 public override string[] GetUsersInRole(string roleName)
 {
     string[] result = null;
     List<string> userList = new List<string>();
     try
     {
         NameAndGUIDRequest userGroupReq = new NameAndGUIDRequest();
         userGroupReq.ItemElementName = ItemChoiceType61.name;
         userGroupReq.Item = roleName;
         GetUserGroupRes res = _axlService.getUserGroup(userGroupReq);
         if (res != null && res.@return != null && [email protected] != null)
         {
             foreach (XUserGroupMember member in [email protected])
             {
                 userList.Add(member.Item.ToString());
             }
         }
     }
     catch (Exception getGroupException)
     {
         log.Error("Impossible de récupérer la liste des utilisateurs appartenants au groupe " + roleName + ": " + getGroupException.ToString());
     }
     if (userList != null)
     {
         result = userList.ToArray();
     }
     return result;
 }
コード例 #5
0
ファイル: CiscoRoleProvider.cs プロジェクト: gnomix/T.A.L.K.
        public override bool RoleExists(string roleName)
        {
            bool result = false;

            try
            {
                NameAndGUIDRequest userGroupReq = new NameAndGUIDRequest();
                userGroupReq.ItemElementName = ItemChoiceType61.name;
                userGroupReq.Item = roleName;
                GetUserGroupRes res = _axlService.getUserGroup(userGroupReq);
                if (res != null && res.@return != null && [email protected] != null)
                {
                    result = true;
                }
            }
            catch (Exception roleExistsException)
            {
                log.Error("Impossible de savoir si le role " + roleName + " existe: " + roleExistsException.ToString());
            }
            return result;
        }