removeUserFromGroup method

Future<void> removeUserFromGroup({
  1. String? groupname,
  2. String? groupId,
  3. String? username,
  4. required String accountId,
})

Removes a user from a group.

Permissions required: Site administration (that is, member of the site-admin group).

Implementation

Future<void> removeUserFromGroup(
    {String? groupname,
    String? groupId,
    String? username,
    required String accountId}) async {
  await _client.send(
    'delete',
    'rest/api/3/group/user',
    queryParameters: {
      if (groupname != null) 'groupname': groupname,
      if (groupId != null) 'groupId': groupId,
      if (username != null) 'username': username,
      'accountId': accountId,
    },
  );
}