fix: [users:view] Temporary measure to gracefully catch connection issue with keycloak
parent
79a97efa70
commit
7cda322223
|
@ -154,7 +154,12 @@ class UsersController extends AppController
|
|||
}
|
||||
$keycloakUsersParsed = null;
|
||||
if (!empty(Configure::read('keycloak.enabled'))) {
|
||||
$keycloakUsersParsed = $this->Users->getParsedKeycloakUser();
|
||||
try {
|
||||
$keycloakUsersParsed = $this->Users->getParsedKeycloakUser();
|
||||
} catch (\Exception $e) {
|
||||
$keycloakUsersParsed = [];
|
||||
$this->Flash->error(__('Issue while connecting to keycloak. {0}', $e->getMessage()));
|
||||
}
|
||||
}
|
||||
$this->CRUD->view($id, [
|
||||
'contain' => ['Individuals' => ['Alignments' => 'Organisations'], 'Roles', 'Organisations'],
|
||||
|
|
|
@ -459,7 +459,7 @@ class AuthKeycloakBehavior extends Behavior
|
|||
$requireUpdate = true;
|
||||
$differences = [
|
||||
'user' => [
|
||||
'keycloak' => 'USER NOT FOUND',
|
||||
'keycloak' => __('ERROR or USER NOT FOUND'),
|
||||
'cerebrate' => $user['username']
|
||||
]
|
||||
];
|
||||
|
|
Loading…
Reference in New Issue