From 78900a30d55445c5193b2dc7917e31f9281b0e55 Mon Sep 17 00:00:00 2001 From: Luc Date: Wed, 18 Dec 2024 23:36:59 +0100 Subject: [PATCH] Update user settings --- web/src/components/settings/nav.tsx | 20 +++++++++++++++++--- web/src/routeTree.gen.ts | 26 ++++++++++++++++++++++++++ web/src/routes/settings/users.tsx | 16 ++++++++++++++++ 3 files changed, 59 insertions(+), 3 deletions(-) create mode 100644 web/src/routes/settings/users.tsx diff --git a/web/src/components/settings/nav.tsx b/web/src/components/settings/nav.tsx index b7bbe78..9d3cb76 100644 --- a/web/src/components/settings/nav.tsx +++ b/web/src/components/settings/nav.tsx @@ -10,9 +10,18 @@ import { LuSearch, LuSettings, LuTag, + LuUsers, } from 'react-icons/lu'; +import { useHasPolicy } from '@/api/policy'; + +export function isTruthy(value?: T | undefined | null | false): value is T { + return !!value; +} + export const SettingsNav = () => { + const { ok: hasUsersPermissions } = useHasPolicy('user', '', 'write'); + return (