fix(sidebar): show Settings entry to non-admin users

Companion to 4c7e981 — the SettingsPage was opened to non-admins but
the LeftSidebar still gated the entry button on isAdmin, so non-admins
had no way to reach it. The page itself is the source of truth for
which tabs and controls are visible per role.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Claudio
2026-04-26 09:59:24 +02:00
parent e4127f1e04
commit f811aae641

View File

@@ -991,20 +991,20 @@ export function LeftSidebar() {
</button>
</div>
{/* Settings — admin only, navigates to the settings section */}
{isAdmin && (
<button
onClick={() => navigateToSection('settings', {})}
className={cn(
'flex w-full items-center gap-2 rounded px-2 py-1 text-[12px] hover:bg-surface-2 hover:text-text',
currentSection === 'settings' ? 'text-primary' : 'text-text-muted',
)}
title="Settings"
>
<Settings className="h-3.5 w-3.5" />
Settings
</button>
)}
{/* Settings — visible to all signed-in users; the panel itself
hides admin-only tabs (Users) and admin-only controls inside
the AI tab. Library + Nextcloud config is per-user. */}
<button
onClick={() => navigateToSection('settings', {})}
className={cn(
'flex w-full items-center gap-2 rounded px-2 py-1 text-[12px] hover:bg-surface-2 hover:text-text',
currentSection === 'settings' ? 'text-primary' : 'text-text-muted',
)}
title="Settings"
>
<Settings className="h-3.5 w-3.5" />
Settings
</button>
<Footer />
</div>