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