fix: [authKeycloakBehavior] Re-indexing array preventing roles to be parsed by keycloak

cli-modification-summary
Sami Mokaddem 2022-09-21 10:06:33 +02:00
parent efe917c824
commit 69fee02498
No known key found for this signature in database
GPG Key ID: 164C473F627A06FA
1 changed files with 1 additions and 0 deletions

View File

@ -472,6 +472,7 @@ class AuthKeycloakBehavior extends Behavior
$toAdd[$k] = $userRoles[$name];
}
if (!empty($toAdd)) {
$toAdd = array_values($toAdd);
$response = $this->restApiRequest('%s/admin/realms/%s/users/' . $keycloakUser['id'] . '/role-mappings/clients/' . $clientId, $toAdd, 'post');
if (!$response->isOk()) {
$this->_table->auditLogs()->insert([