diff --git a/client/src/app/site/users/components/user-detail/user-detail.component.html b/client/src/app/site/users/components/user-detail/user-detail.component.html
index 046461009..74d3c3535 100644
--- a/client/src/app/site/users/components/user-detail/user-detail.component.html
+++ b/client/src/app/site/users/components/user-detail/user-detail.component.html
@@ -2,6 +2,7 @@
[mainButton]="isAllowed('changePersonal')"
mainButtonIcon="edit"
[nav]="false"
+ [goBack]="!isAllowed('seeOtherUsers')"
[editMode]="editUser"
(mainEvent)="setEditMode(!editUser)"
(saveEvent)="saveUser()"
@@ -21,7 +22,7 @@
-
-
+
Generate
Only for internal notes.
diff --git a/client/src/app/site/users/components/user-detail/user-detail.component.ts b/client/src/app/site/users/components/user-detail/user-detail.component.ts
index 1359b0386..ec1e9654d 100644
--- a/client/src/app/site/users/components/user-detail/user-detail.component.ts
+++ b/client/src/app/site/users/components/user-detail/user-detail.component.ts
@@ -168,10 +168,12 @@ export class UserDetailComponent extends BaseViewComponent implements OnInit {
* actions might be:
* - delete (deleting the user) (users.can_manage and not ownPage)
* - seeName (title, 1st, last) (user.can_see_name or ownPage)
+ * - seeOtherUsers (title, 1st, last) (user.can_see_name)
* - seeExtra (checkboxes, comment) (user.can_see_extra_data)
* - seePersonal (mail, username, about) (user.can_see_extra_data or ownPage)
* - manage (everything) (user.can_manage)
* - changePersonal (mail, username, about) (user.can_manage or ownPage)
+ * - changePassword (user.can_change_password)
*
* @param action the action the user tries to perform
*/
@@ -183,12 +185,16 @@ export class UserDetailComponent extends BaseViewComponent implements OnInit {
return this.operator.hasPerms('users.can_manage');
case 'seeName':
return this.operator.hasPerms('users.can_see_name', 'users.can_manage') || this.ownPage;
+ case 'seeOtherUsers':
+ return this.operator.hasPerms('users.can_see_name', 'users.can_manage');
case 'seeExtra':
return this.operator.hasPerms('users.can_see_extra_data', 'users.can_manage');
case 'seePersonal':
return this.operator.hasPerms('users.can_see_extra_data', 'users.can_manage') || this.ownPage;
case 'changePersonal':
return this.operator.hasPerms('users.can_manage') || this.ownPage;
+ case 'changePassword':
+ return this.ownPage && this.operator.hasPerms('users.can_change_password');
default:
return false;
}