From c0530f00d98b446d295806256a11bf9884cfcd47 Mon Sep 17 00:00:00 2001 From: Antoine Dufils Date: Fri, 11 Oct 2024 18:34:39 +0200 Subject: [PATCH] security: disable possibility for non-admin users from editing fields except "place" in user modal --- src/components/dashboard/UserModal.tsx | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/src/components/dashboard/UserModal.tsx b/src/components/dashboard/UserModal.tsx index c53af6b9..22de6503 100644 --- a/src/components/dashboard/UserModal.tsx +++ b/src/components/dashboard/UserModal.tsx @@ -275,26 +275,20 @@ const UserModal = ({ containerClassName={styles.userModal}> <> - - + + {(!searchUser || searchUser.type !== UserType.attendant) && ( <> - - + + {!searchUser && ( - + )}