Skip to content

Commit 359590c

Browse files
authored
fix: wire workspace.skills into the sidebar + workspace-index gates (open-webui#24729)
Reported by bwgabrielsusai on open-webui#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.
1 parent eba1540 commit 359590c

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

src/lib/components/layout/Sidebar.svelte

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,8 @@
119119
$user?.permissions?.workspace?.models ||
120120
$user?.permissions?.workspace?.knowledge ||
121121
$user?.permissions?.workspace?.prompts ||
122-
$user?.permissions?.workspace?.tools
122+
$user?.permissions?.workspace?.tools ||
123+
$user?.permissions?.workspace?.skills
123124
);
124125
case 'automations':
125126
return (

src/routes/(app)/workspace/+page.svelte

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
goto('/workspace/prompts');
1414
} else if ($user?.permissions?.workspace?.tools) {
1515
goto('/workspace/tools');
16+
} else if ($user?.permissions?.workspace?.skills) {
17+
goto('/workspace/skills');
1618
} else {
1719
goto('/');
1820
}

0 commit comments

Comments
 (0)