From ec4b6c9aa2b4f92ee8b9ea3aa592135e5a0a8056 Mon Sep 17 00:00:00 2001 From: Weiko Date: Tue, 4 Mar 2025 10:51:06 +0100 Subject: [PATCH] Fix: security and developers path should not be accessible to non-admin users (#10628) https://github.com/twentyhq/core-team-issues/issues/468 --- .../modules/app/components/SettingsRoutes.tsx | 141 +++++++++++------- 1 file changed, 84 insertions(+), 57 deletions(-) diff --git a/packages/twenty-front/src/modules/app/components/SettingsRoutes.tsx b/packages/twenty-front/src/modules/app/components/SettingsRoutes.tsx index d6f24a2d6..c0836f8a3 100644 --- a/packages/twenty-front/src/modules/app/components/SettingsRoutes.tsx +++ b/packages/twenty-front/src/modules/app/components/SettingsRoutes.tsx @@ -312,14 +312,22 @@ export const SettingsRoutes = ({ /> } > + } /> } /> + } /> - } /> - } /> } - /> + element={ + + } + > + } + /> + } /> } /> + } + /> + } + /> + } + /> } /> } /> - } /> } - /> - } - /> - } - /> + element={ + + } + > + } + /> + } + /> + } + /> + } + /> + } + /> + } + /> + } + /> + } + /> + } + /> + {isFunctionSettingsEnabled && ( <> )} - } - /> - } - /> - } - /> - } - /> - } - /> - } - /> - } - /> - } - /> } /> - } /> } - /> - } - /> + element={ + + } + > + } /> + } + /> + } + /> + {isAdminPageEnabled && ( <>