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); }
/* * 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); }
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); }
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; }
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; }