chg: [users view] added KC checks for the profile link
parent
be064bb0c9
commit
c6572885a9
|
@ -1,9 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
echo $this->element(
|
$kcurl = $keycloakConfig['provider']['baseUrl'] . '/realms/' . $keycloakConfig['provider']['realm'] . '/account/#/security/signingin';
|
||||||
'/genericElements/SingleViews/single_view',
|
$fields = [
|
||||||
[
|
|
||||||
'data' => $entity,
|
|
||||||
'fields' => [
|
|
||||||
[
|
[
|
||||||
'key' => __('ID'),
|
'key' => __('ID'),
|
||||||
'path' => 'id'
|
'path' => 'id'
|
||||||
|
@ -51,7 +48,21 @@ echo $this->element(
|
||||||
'path' => 'individual',
|
'path' => 'individual',
|
||||||
'scope' => 'individuals'
|
'scope' => 'individuals'
|
||||||
]
|
]
|
||||||
],
|
];
|
||||||
|
if ($keycloakConfig['enabled'] && $loggedUser['id'] == $entity['id']) {
|
||||||
|
$fields[] = [
|
||||||
|
'type' => 'generic',
|
||||||
|
'key' => __('Modify keycloak profile'),
|
||||||
|
'path' => 'username',
|
||||||
|
'url' => $kcurl,
|
||||||
|
'requirements' => false
|
||||||
|
];
|
||||||
|
}
|
||||||
|
echo $this->element(
|
||||||
|
'/genericElements/SingleViews/single_view',
|
||||||
|
[
|
||||||
|
'data' => $entity,
|
||||||
|
'fields' => $fields,
|
||||||
'children' => [
|
'children' => [
|
||||||
[
|
[
|
||||||
'url' => '/AuthKeys/index?Users.id={{0}}',
|
'url' => '/AuthKeys/index?Users.id={{0}}',
|
||||||
|
|
Loading…
Reference in New Issue