fix: when auth is disabled, the users entity doesn't exist

This commit is contained in:
dswbx
2024-11-21 08:23:16 +01:00
parent 4e7c1e6e9f
commit 0df5c761ec
14 changed files with 212 additions and 74 deletions

View File

@@ -33,16 +33,22 @@ export function AuthRoot({ children }) {
<AppShell.SidebarLink
as={Link}
href={app.getAbsolutePath("/data/" + routes.data.entity.list(users_entity))}
disabled={!config.auth.enabled}
>
Users
</AppShell.SidebarLink>
<AppShell.SidebarLink as={Link} href={routes.auth.roles.list()}>
<AppShell.SidebarLink
as={Link}
href={routes.auth.roles.list()}
disabled={!config.auth.enabled}
>
Roles & Permissions
</AppShell.SidebarLink>
<AppShell.SidebarLink as={Link} href={routes.auth.strategies()} disabled>
Strategies
</AppShell.SidebarLink>
<AppShell.SidebarLink as={Link} href={routes.auth.settings()}>
{/*<AppShell.SidebarLink as={Link} href={routes.auth.settings()}>*/}
<AppShell.SidebarLink as={Link} href={app.getSettingsPath(["auth"])}>
Settings
</AppShell.SidebarLink>
</nav>