updateUserRolesWithHttpInfo method
Future<Response>
updateUserRolesWithHttpInfo(
- String userId,
- MmUpdateUserRolesRequest mmUpdateUserRolesRequest
Update a user's roles
Update a user's system-level roles. Valid user roles are "system_user", "system_admin" or both of them. Overwrites any previously assigned system-level roles. ##### Permissions Must have the manage_roles
permission.
Note: This method returns the HTTP Response
.
Parameters:
-
String userId (required): User GUID
-
MmUpdateUserRolesRequest mmUpdateUserRolesRequest (required): Space-delimited system roles to assign to the user
Implementation
Future<Response> updateUserRolesWithHttpInfo(
String userId,
MmUpdateUserRolesRequest mmUpdateUserRolesRequest,
) async {
// ignore: prefer_const_declarations
final path = r'/users/{user_id}/roles'.replaceAll('{user_id}', userId);
// ignore: prefer_final_locals
Object? postBody = mmUpdateUserRolesRequest;
final queryParams = <MmQueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
path,
'PUT',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}