From 0aedc77fd4a3d1a479940e8e092a274da09a9fca Mon Sep 17 00:00:00 2001 From: FinnStutzenstein Date: Fri, 24 May 2019 13:35:00 +0200 Subject: [PATCH] Fix permissions for change-own-password-view and user-profile-view --- client/src/app/site/site-routing.module.ts | 5 +++-- client/src/app/site/users/users-routing.module.ts | 8 +++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/client/src/app/site/site-routing.module.ts b/client/src/app/site/site-routing.module.ts index d8ddbaa3e..f0715741b 100644 --- a/client/src/app/site/site-routing.module.ts +++ b/client/src/app/site/site-routing.module.ts @@ -45,8 +45,9 @@ const routes: Routes = [ }, { path: 'users', - loadChildren: './users/users.module#UsersModule', - data: { basePerm: 'users.can_see_name' } + loadChildren: './users/users.module#UsersModule' + // No baseperm, because change own password is ok, even if the + // user does not have users.can_see_name }, { path: 'tags', diff --git a/client/src/app/site/users/users-routing.module.ts b/client/src/app/site/users/users-routing.module.ts index 8d4254a42..88f90193c 100644 --- a/client/src/app/site/users/users-routing.module.ts +++ b/client/src/app/site/users/users-routing.module.ts @@ -12,7 +12,8 @@ const routes: Routes = [ { path: '', component: UserListComponent, - pathMatch: 'full' + pathMatch: 'full', + data: { basePerm: 'users.can_see_name' } }, { path: 'password', @@ -47,8 +48,9 @@ const routes: Routes = [ }, { path: ':id', - component: UserDetailComponent, - data: { basePerm: 'users.can_see_name' } + component: UserDetailComponent + // No basePerm, because user is allowed to see the own profile page. + // Other user detail pages are empty if user does not have user.can_see_name. } ];