mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-18 05:05:09 +02:00
fix: wire workspace.skills into the sidebar + workspace-index gates (#24729)
Reported by bwgabrielsusai on #24719: granting a user only `workspace.skills` doesn't show the Workspace menu, and visiting `/workspace` directly bounces them to `/`. The per-route guard in `/workspace/+layout.svelte` already covered skills, but two earlier gates in the chain didn't: * `Sidebar.svelte` case 'workspace' OR'd models/knowledge/prompts/tools to decide menu visibility — skills was missing, so the entry never rendered for skills-only users. * `/workspace/+page.svelte` redirect chain picked the first available section — skills was missing, so the fallback `goto('/')` fired. Adding skills to both.
This commit is contained in:
@@ -119,7 +119,8 @@
|
||||
$user?.permissions?.workspace?.models ||
|
||||
$user?.permissions?.workspace?.knowledge ||
|
||||
$user?.permissions?.workspace?.prompts ||
|
||||
$user?.permissions?.workspace?.tools
|
||||
$user?.permissions?.workspace?.tools ||
|
||||
$user?.permissions?.workspace?.skills
|
||||
);
|
||||
case 'automations':
|
||||
return (
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
goto('/workspace/prompts');
|
||||
} else if ($user?.permissions?.workspace?.tools) {
|
||||
goto('/workspace/tools');
|
||||
} else if ($user?.permissions?.workspace?.skills) {
|
||||
goto('/workspace/skills');
|
||||
} else {
|
||||
goto('/');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user