From d22980c867c8d4208088c353338d6638f358b8e2 Mon Sep 17 00:00:00 2001 From: Tameem Bin Haider Date: Wed, 1 Jan 2025 17:20:16 +0600 Subject: [PATCH 1/2] fix: add disable logic to profile image --- .../client/src/views/SysAdmin/Team/user/UserList.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/client/src/views/SysAdmin/Team/user/UserList.tsx b/packages/client/src/views/SysAdmin/Team/user/UserList.tsx index 201a16ea7e..49b58eb2e6 100644 --- a/packages/client/src/views/SysAdmin/Team/user/UserList.tsx +++ b/packages/client/src/views/SysAdmin/Team/user/UserList.tsx @@ -507,9 +507,7 @@ function UserListComponent(props: IProps) { return { image: ( - navigate( formatUrl(routes.USER_PROFILE, { @@ -517,7 +515,10 @@ function UserListComponent(props: IProps) { }) ) } - /> + disabled={!canReadUser(user)} + > + + ), label: ( Date: Wed, 1 Jan 2025 17:28:40 +0600 Subject: [PATCH 2/2] fix: give update scopes access to user data --- packages/gateway/src/features/user/root-resolvers.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/gateway/src/features/user/root-resolvers.ts b/packages/gateway/src/features/user/root-resolvers.ts index 87e60cdd4b..3aa98259f8 100644 --- a/packages/gateway/src/features/user/root-resolvers.ts +++ b/packages/gateway/src/features/user/root-resolvers.ts @@ -52,7 +52,9 @@ export const resolvers: GQLResolver = { !inScope(authHeader, [ SCOPES.USER_READ, SCOPES.USER_READ_MY_OFFICE, - SCOPES.USER_READ_MY_JURISDICTION + SCOPES.USER_READ_MY_JURISDICTION, + SCOPES.USER_UPDATE, + SCOPES.USER_UPDATE_MY_JURISDICTION ]) && !isTokenOwner(authHeader, userId!) ) {