From e4b228779c462b6c852b385d5322e88668cbc850 Mon Sep 17 00:00:00 2001 From: Riccardo Mancini Date: Wed, 13 May 2026 11:03:11 +0200 Subject: [PATCH] Restrict "automation" tab visibility based on admin role --- app/(protected)/_layout.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/(protected)/_layout.tsx b/app/(protected)/_layout.tsx index e06e97b..9da82f3 100644 --- a/app/(protected)/_layout.tsx +++ b/app/(protected)/_layout.tsx @@ -67,12 +67,12 @@ export default function ProtectedLayout() { tabBarIcon: ({ color, size }) => , }} /> - {/* // TODO: Probably needs to be restricted to admin */} , + href: authState.user?.role === 'Amministratore' ? undefined : null, }} /> {/* TODO: Should be removed - move tabs inside (tabs) and refactor _layout */}