diff --git a/netmanager-app/app/(authenticated)/profile/components/ProfileTabs.tsx b/netmanager-app/app/(authenticated)/profile/components/ProfileTabs.tsx index 187de908cc..bec5206278 100644 --- a/netmanager-app/app/(authenticated)/profile/components/ProfileTabs.tsx +++ b/netmanager-app/app/(authenticated)/profile/components/ProfileTabs.tsx @@ -6,17 +6,21 @@ import MyProfile from "./MyProfile" import PasswordEdit from "./PasswordEdit" import ApiTokens from "./ApiTokens" import ClientManagement from "./Clients" +import { usePermissions } from "@/core/hooks/usePermissions" export default function ProfileTabs() { const [activeTab, setActiveTab] = useState("profile") + const { hasPermission } = usePermissions() + + const canManageClients = hasPermission("CREATE_UPDATE_AND_DELETE_NETWORK_USERS") return ( - + My Profile Password Edit API Access Tokens - Clients + {canManageClients && Clients} @@ -27,10 +31,11 @@ export default function ProfileTabs() { - - - + {canManageClients && ( + + + + )} ) } -