From c9921b386cf1f9d2d31fc60a13ad83e54a341ee7 Mon Sep 17 00:00:00 2001 From: Philipp Dorschner Date: Wed, 25 Sep 2019 10:39:46 +0200 Subject: [PATCH 1/6] Load user roles and populate to view --- application/controllers/UserController.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/application/controllers/UserController.php b/application/controllers/UserController.php index cdf2b77da..5a5b3c754 100644 --- a/application/controllers/UserController.php +++ b/application/controllers/UserController.php @@ -5,6 +5,7 @@ namespace Icinga\Controllers; use Exception; use Icinga\Application\Logger; +use Icinga\Authentication\AdmissionLoader; use Icinga\Authentication\User\DomainAwareInterface; use Icinga\Data\DataArray\ArrayDatasource; use Icinga\Exception\ConfigurationError; @@ -165,6 +166,10 @@ class UserController extends AuthBackendController )); $this->view->removeForm = $removeForm; } + + $admissionLoader = new AdmissionLoader(); + $admissionLoader->applyRoles($userObj); + $this->view->userObj = $userObj; } /** From 8645035ecc21ea5dfb507b379e4d9e9560637c24 Mon Sep 17 00:00:00 2001 From: Philipp Dorschner Date: Wed, 25 Sep 2019 10:41:58 +0200 Subject: [PATCH 2/6] Display the roles of a user --- application/views/scripts/user/show.phtml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/application/views/scripts/user/show.phtml b/application/views/scripts/user/show.phtml index 51c627ff7..aaeffd51e 100644 --- a/application/views/scripts/user/show.phtml +++ b/application/views/scripts/user/show.phtml @@ -40,6 +40,27 @@ use Icinga\Data\Selectable; translate('Last modified'); ?> last_modified === null ? '-' : $this->formatDateTime($user->last_modified); ?> + + translate('Role Memberships'); ?> + + getRoles(); ?> + + + +

translate('No memberships found'); ?>

+ + + compact): ?>

translate('Group Memberships'); ?>

From 5e22caab6100b0001d702922b577515995c11b51 Mon Sep 17 00:00:00 2001 From: Philipp Dorschner Date: Wed, 25 Sep 2019 10:42:17 +0200 Subject: [PATCH 3/6] Style role memberships --- public/css/icinga/main.less | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/public/css/icinga/main.less b/public/css/icinga/main.less index 36b438752..7f794c356 100644 --- a/public/css/icinga/main.less +++ b/public/css/icinga/main.less @@ -340,3 +340,21 @@ a:hover > .icon-cancel { opacity: 1; } } + +.role-memberships { + letter-spacing: -0.417em; + list-style-type: none; + margin: 0; + padding: 0; + + > li { + display: inline-block; + letter-spacing: normal; + margin: 0; + padding: 0 0.25em 0 0; + + &:last-child { + padding-right: 0; + } + } +} \ No newline at end of file From 57b64f85bfe141160bbb8bb4b166be6fcd9c1810 Mon Sep 17 00:00:00 2001 From: Philipp Dorschner Date: Wed, 25 Sep 2019 10:58:43 +0200 Subject: [PATCH 4/6] de_DE: Translate "Role Memberships" --- .../locale/de_DE/LC_MESSAGES/icinga.mo | Bin 70693 -> 70828 bytes .../locale/de_DE/LC_MESSAGES/icinga.po | 75 ++++++++++-------- 2 files changed, 42 insertions(+), 33 deletions(-) diff --git a/application/locale/de_DE/LC_MESSAGES/icinga.mo b/application/locale/de_DE/LC_MESSAGES/icinga.mo index 982cbbfa9cc9a6570d20084c318191ad162ee399..49793daf5e8dfbb68db061cb98e9e85aedb764bd 100644 GIT binary patch delta 14573 zcmYk?2YgP~AII_gkOYy0B#0G>kq9A!h~31jkr*Y4qBVlpN^Krmqm(KSs%qD+RWaM5 z_AaVcmD;M+8f}%L{-5u2PG7J8ef8vhe&?Kf?^*XgPom3L`K(>-CBd(gyosCHxd4@LLSV-?0ojwHzk~qOdeJ!=m^$ zhTt@ecO18~m`qg)PGK_UuI)IDFa?wFee}hhs1x^LVLXSq@IL0lzcCbZz2Z3GSPcEJ zIx-$774u?!)cGwii2FNPWb#um%r==3l!s^;NURS(ux6IBFBU zi)?6TF>306ME0puh#ji(R;U|I#~!!<)6uuFnYmV|_QO$2vlTVt$52nvB{!KUGP#?W z8^+Y;=#!ZPUSgT?Xab09gPD{+h z`N+WBPLAegEdx+5hzQikYhVD@#XxM1`LH8uY5Lmu1I$hQDeCcBhHAgvdJr}B-(x)9 zMGc@x3tgY}k0qn2tA@j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cUdL{Ovz78O zp0rBk+ymssk>Y95gW6f7%fvsCGDuq~4@4aw+pBcI2Bhhf&#`r?57rNkZz+oQi{66jL5mYuN>9}omsf;IHfpbaq$hW~Yq)77Vcmi9H^d)ix=>+Gl zB=sSmV6XF)l_Kw_O$f1m*V8eHd?9@&-b_Ycm6wvbbKy6Mhu}8Uv7G#P(lz3~#H~q5 z\n" "Language: de_DE\n" "MIME-Version: 1.0\n" @@ -152,7 +152,7 @@ msgid "Acknowledge this announcement" msgstr "Diese Bekanntmachung bestätigen" #: ../../../../application/forms/Config/User/UserForm.php:24 -#: ../../../../application/controllers/UserController.php:80 +#: ../../../../application/controllers/UserController.php:81 #: ../../../../application/views/scripts/user/show.phtml:33 #: ../../../../library/Icinga/Authentication/User/LdapUserBackend.php:270 #: ../../../../library/Icinga/Authentication/User/DbUserBackend.php:105 @@ -399,7 +399,7 @@ msgctxt "group.membership" msgid "Cancel" msgstr "Beenden" -#: ../../../../application/controllers/UserController.php:164 +#: ../../../../application/controllers/UserController.php:165 msgid "Cancel this membership" msgstr "Diese Mitgliedschaft beenden" @@ -533,7 +533,7 @@ msgstr "" "Modul-Hooks fehlgeschlagen. Bitte die Logs prüfen" #: ../../../../application/controllers/GroupController.php:377 -#: ../../../../application/controllers/UserController.php:328 +#: ../../../../application/controllers/UserController.php:334 #: ../../../../application/controllers/RoleController.php:116 msgid "" "Configure roles to permit or restrict users and groups accessing Icinga Web 2" @@ -606,7 +606,7 @@ msgstr "Konnte Dashboard nicht speichern" msgid "Create" msgstr "Erstellen" -#: ../../../../application/views/scripts/user/show.phtml:57 +#: ../../../../application/views/scripts/user/show.phtml:83 msgid "Create New Membership" msgstr "Neue Gruppenmitgliedschaft" @@ -693,7 +693,7 @@ msgstr "Erstellt am" #: ../../../../application/controllers/GroupController.php:81 #: ../../../../application/controllers/GroupController.php:117 -#: ../../../../application/controllers/UserController.php:81 +#: ../../../../application/controllers/UserController.php:82 #: ../../../../application/views/scripts/group/show.phtml:33 #: ../../../../application/views/scripts/user/show.phtml:36 #: ../../../../library/Icinga/Authentication/User/DbUserBackend.php:106 @@ -888,6 +888,7 @@ msgid "Edit resource %s" msgstr "Ressource %s bearbeiten" #: ../../../../application/views/scripts/role/list.phtml:36 +#: ../../../../application/views/scripts/user/show.phtml:56 #, php-format msgid "Edit role %s" msgstr "Rolle %s bearbeiten" @@ -1033,7 +1034,7 @@ msgid "Failed to fetch any users from backend %s. Please check your log" msgstr "" "Es konnten keine Benutzer vom Backend %s geholt werden. Bitte Log überprüfen" -#: ../../../../application/controllers/UserController.php:286 +#: ../../../../application/controllers/UserController.php:292 #, php-format msgid "Failed to fetch memberships from backend %s. Please check your log" msgstr "" @@ -1192,8 +1193,8 @@ msgid "Grid Chart" msgstr "Netzansicht" #: ../../../../application/controllers/GroupController.php:357 -#: ../../../../application/controllers/UserController.php:124 -#: ../../../../application/views/scripts/user/show.phtml:78 +#: ../../../../application/controllers/UserController.php:125 +#: ../../../../application/views/scripts/user/show.phtml:104 msgid "Group" msgstr "Benutzergruppe" @@ -1216,7 +1217,7 @@ msgstr "Benutzergruppe \"%s\" wurde entfernt" msgid "Group \"%s\" not found" msgstr "Benutzergruppe \"%s\" wurde nicht gefunden" -#: ../../../../application/views/scripts/user/show.phtml:45 +#: ../../../../application/views/scripts/user/show.phtml:71 msgid "Group Memberships" msgstr "Gruppenmitglieder" @@ -1425,7 +1426,7 @@ msgstr "LDAP Objektklasse für Benutzer" #: ../../../../application/controllers/GroupController.php:82 #: ../../../../application/controllers/GroupController.php:118 -#: ../../../../application/controllers/UserController.php:82 +#: ../../../../application/controllers/UserController.php:83 #: ../../../../application/views/scripts/group/show.phtml:37 #: ../../../../application/views/scripts/user/show.phtml:40 #: ../../../../library/Icinga/Authentication/UserGroup/LdapUserGroupBackend.php:575 @@ -1457,7 +1458,7 @@ msgid "List announcements" msgstr "Bekanntmachungen auflisten" #: ../../../../application/controllers/GroupController.php:394 -#: ../../../../application/controllers/UserController.php:345 +#: ../../../../application/controllers/UserController.php:351 #: ../../../../application/controllers/RoleController.php:133 msgid "List groups of user group backends" msgstr "Gruppen der Benutzergruppenbackends auflisten" @@ -1467,7 +1468,7 @@ msgid "List intalled modules" msgstr "Installierte Module auflisten" #: ../../../../application/controllers/GroupController.php:386 -#: ../../../../application/controllers/UserController.php:337 +#: ../../../../application/controllers/UserController.php:343 #: ../../../../application/controllers/RoleController.php:125 msgid "List users of authentication backends" msgstr "Benutzer der Authentifizierungsbackends auflisten" @@ -1715,7 +1716,7 @@ msgstr "Neue Ressource erstellen" msgid "New Role" msgstr "Neue Rolle anlegen" -#: ../../../../application/controllers/UserController.php:182 +#: ../../../../application/controllers/UserController.php:188 msgid "New User" msgstr "Neuen Benutzer anlegen" @@ -1798,7 +1799,11 @@ msgid "No group member found matching the filter" msgstr "" "Es wurde kein Gruppenmitglied gefunden, das den Filterkriterien entspricht" -#: ../../../../application/views/scripts/user/show.phtml:71 +#: ../../../../application/views/scripts/user/show.phtml:65 +msgid "No memberships found" +msgstr "Es wurden keine Mitgliedschaften gefunden" + +#: ../../../../application/views/scripts/user/show.phtml:97 msgid "No memberships found matching the filter" msgstr "" "Es wurde keine Mitgliedschaften gefunden, welche den Filterkriterien " @@ -2099,7 +2104,7 @@ msgstr "Ressource entfernen" msgid "Remove Role" msgstr "Rolle entfernen" -#: ../../../../application/controllers/UserController.php:226 +#: ../../../../application/controllers/UserController.php:232 msgid "Remove User" msgstr "Benutzer entfernen" @@ -2277,6 +2282,10 @@ msgstr "" msgid "Restrictions" msgstr "Einschränkungen" +#: ../../../../application/views/scripts/user/show.phtml:44 +msgid "Role Memberships" +msgstr "Rollenmitgliedschaften" + #: ../../../../application/forms/Security/RoleForm.php:151 msgid "Role Name" msgstr "Rollenname" @@ -2311,7 +2320,7 @@ msgid "Role updated" msgstr "Rolle aktualisiert" #: ../../../../application/controllers/GroupController.php:375 -#: ../../../../application/controllers/UserController.php:326 +#: ../../../../application/controllers/UserController.php:332 #: ../../../../application/controllers/RoleController.php:21 #: ../../../../application/controllers/RoleController.php:114 msgid "Roles" @@ -2507,7 +2516,7 @@ msgstr "Dashlet %s anzeigen" msgid "Show detailed information about %s" msgstr "Zeige detaillierte Informationen über %s" -#: ../../../../application/views/scripts/user/show.phtml:91 +#: ../../../../application/views/scripts/user/show.phtml:117 #, php-format msgid "Show detailed information for group %s" msgstr "Zeige detaillierte Informationen über die Gruppe %s" @@ -2535,7 +2544,7 @@ msgstr "Zeige die Zeilen %u bis %u von %u" msgid "Show the overview of the %s module" msgstr "Zeige die Übersicht des Moduls %s" -#: ../../../../application/controllers/UserController.php:307 +#: ../../../../application/controllers/UserController.php:313 #, php-format msgid "Show user %s" msgstr "Zeige Benutzer %s" @@ -3210,7 +3219,7 @@ msgstr "Ressource aktualisieren" msgid "Update Role" msgstr "Rolle aktualisieren" -#: ../../../../application/controllers/UserController.php:204 +#: ../../../../application/controllers/UserController.php:210 msgid "Update User" msgstr "Benutzer aktualisieren" @@ -3255,7 +3264,7 @@ msgid "Use the following timezone for dates and times" msgstr "Die folgende Zeitzone für Datums- und Zeitangaben verwenden" #: ../../../../application/forms/Config/Resource/SshResourceForm.php:45 -#: ../../../../application/controllers/UserController.php:308 +#: ../../../../application/controllers/UserController.php:314 msgid "User" msgstr "Benutzer" @@ -3274,10 +3283,10 @@ msgstr "Der Benutzer \"%s\" wurde entfernt" msgid "User \"%s\" has been removed from group \"%s\"" msgstr "Der Benutzer \"%s\" wurde aus der Gruppe \"%s\" entfernt" -#: ../../../../application/controllers/UserController.php:104 -#: ../../../../application/controllers/UserController.php:201 -#: ../../../../application/controllers/UserController.php:223 -#: ../../../../application/controllers/UserController.php:239 +#: ../../../../application/controllers/UserController.php:105 +#: ../../../../application/controllers/UserController.php:207 +#: ../../../../application/controllers/UserController.php:229 +#: ../../../../application/controllers/UserController.php:245 #, php-format msgid "User \"%s\" not found" msgstr "Der Benutzer \"%s\" wurde nicht gefunden" @@ -3288,7 +3297,7 @@ msgid "User %s is already a member of all groups" msgstr "Der Benutzer %s ist bereits Mitglied in allen Gruppen" #: ../../../../application/forms/Config/UserGroup/LdapUserGroupBackendForm.php:77 -#: ../../../../application/controllers/UserController.php:57 +#: ../../../../application/controllers/UserController.php:58 msgid "User Backend" msgstr "Benutzerbackend" @@ -3297,7 +3306,7 @@ msgid "User Backends" msgstr "Benutzerbackends" #: ../../../../application/controllers/GroupController.php:80 -#: ../../../../application/controllers/UserController.php:116 +#: ../../../../application/controllers/UserController.php:117 #: ../../../../application/views/scripts/group/list.phtml:50 #: ../../../../library/Icinga/Authentication/UserGroup/LdapUserGroupBackend.php:573 #: ../../../../library/Icinga/Authentication/UserGroup/DbUserGroupBackend.php:118 @@ -3315,7 +3324,7 @@ msgstr "Benutzergruppenbackends" #: ../../../../application/controllers/GroupController.php:26 #: ../../../../application/controllers/GroupController.php:395 -#: ../../../../application/controllers/UserController.php:346 +#: ../../../../application/controllers/UserController.php:352 #: ../../../../application/controllers/RoleController.php:134 msgid "User Groups" msgstr "Benutzergruppen" @@ -3386,7 +3395,7 @@ msgstr "" #: ../../../../application/forms/Config/User/UserForm.php:33 #: ../../../../application/forms/Authentication/LoginForm.php:48 #: ../../../../application/controllers/GroupController.php:116 -#: ../../../../application/controllers/UserController.php:79 +#: ../../../../application/controllers/UserController.php:80 #: ../../../../application/views/scripts/group/show.phtml:75 #: ../../../../application/views/scripts/user/list.phtml:51 #: ../../../../library/Icinga/Authentication/UserGroup/LdapUserGroupBackend.php:572 @@ -3402,8 +3411,8 @@ msgstr "Benutzername" #: ../../../../application/forms/Config/UserGroup/AddMemberForm.php:118 #: ../../../../application/forms/Navigation/NavigationConfigForm.php:605 #: ../../../../application/controllers/GroupController.php:387 -#: ../../../../application/controllers/UserController.php:25 -#: ../../../../application/controllers/UserController.php:338 +#: ../../../../application/controllers/UserController.php:26 +#: ../../../../application/controllers/UserController.php:344 #: ../../../../application/controllers/RoleController.php:126 #: ../../../../application/views/scripts/role/list.phtml:23 msgid "Users" @@ -3529,7 +3538,7 @@ msgstr "Sie haben noch kein Navigationselement angelegt." msgid "You don't have file-system permissions to write to the file" msgstr "Sie haben keine Schreibrechte auf diese Datei" -#: ../../../../application/controllers/UserController.php:245 +#: ../../../../application/controllers/UserController.php:251 msgid "" "You'll need to configure at least one user group backend first that allows " "to create new memberships" From 564fb8c3200ed09bb0708facfb438d163c60aabf Mon Sep 17 00:00:00 2001 From: Philipp Dorschner Date: Wed, 25 Sep 2019 15:04:54 +0200 Subject: [PATCH 5/6] Only show edit role link if user has the appropriate permission --- application/controllers/UserController.php | 1 + application/views/scripts/user/show.phtml | 37 ++++++++++++---------- 2 files changed, 22 insertions(+), 16 deletions(-) diff --git a/application/controllers/UserController.php b/application/controllers/UserController.php index 5a5b3c754..c10b19b53 100644 --- a/application/controllers/UserController.php +++ b/application/controllers/UserController.php @@ -170,6 +170,7 @@ class UserController extends AuthBackendController $admissionLoader = new AdmissionLoader(); $admissionLoader->applyRoles($userObj); $this->view->userObj = $userObj; + $this->view->allowedToEditRoles = $this->hasPermission('config/authentication/roles/edit'); } /** diff --git a/application/views/scripts/user/show.phtml b/application/views/scripts/user/show.phtml index aaeffd51e..af54912d2 100644 --- a/application/views/scripts/user/show.phtml +++ b/application/views/scripts/user/show.phtml @@ -43,22 +43,27 @@ use Icinga\Data\Selectable; translate('Role Memberships'); ?> - getRoles(); ?> - -
    - -
  • qlink( - $role->getName(), - 'role/edit', - ['role' => $role->getName()], - ['title' => sprintf($this->translate('Edit role %s'), $role->getName())] - ) ?> -
  • - -
- -

translate('No memberships found'); ?>

- + getRoles(); ?> + +
    + +
  • + allowedToEditRoles): ?> + qlink( + $role->getName(), + 'role/edit', + ['role' => $role->getName()], + ['title' => sprintf($this->translate('Edit role %s'), $role->getName())] + ) ?> + + getName() ?> + +
  • + +
+ +

translate('No memberships found'); ?>

+ From aac860b118d5ffbde1045483e708015ec84afe90 Mon Sep 17 00:00:00 2001 From: Philipp Dorschner Date: Thu, 9 Apr 2020 15:04:10 +0200 Subject: [PATCH 6/6] update PR based on the feedback --- application/views/scripts/user/show.phtml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/application/views/scripts/user/show.phtml b/application/views/scripts/user/show.phtml index af54912d2..543e667fa 100644 --- a/application/views/scripts/user/show.phtml +++ b/application/views/scripts/user/show.phtml @@ -43,10 +43,10 @@ use Icinga\Data\Selectable; translate('Role Memberships'); ?> - getRoles(); ?> - + getRoles(); ?> +
    - +
  • allowedToEditRoles): ?> qlink( @@ -54,7 +54,8 @@ use Icinga\Data\Selectable; 'role/edit', ['role' => $role->getName()], ['title' => sprintf($this->translate('Edit role %s'), $role->getName())] - ) ?> + ); + $role === end($roles) ? print '' : print ', '; ?> getName() ?>