revokeUser static method
Implementation
static Future<Map<String, Object?>> revokeUser(
final Client cloudApiClient, {
required final String projectId,
required final String email,
final List<String> unassignRoleNames = const [],
final bool unassignAllRoles = false,
}) async {
final List<String> actuallyUnassigned;
try {
actuallyUnassigned = await cloudApiClient.projects.revokeUser(
cloudProjectId: projectId,
email: email,
unassignRoleNames: unassignRoleNames,
unassignAllRoles: unassignAllRoles,
);
} on NotFoundException catch (e) {
throw FailureException(error: e.message);
} on Exception catch (e, s) {
throw FailureException.nested(e, s, 'Failed to revoke user from project');
}
return {
'unassigned': actuallyUnassigned,
'unassignAllRoles': unassignAllRoles,
};
}