From 59afbd6f92ff6f72a761dc3fc4a8c87d2387a256 Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Thu, 12 Feb 2026 17:35:22 -0600 Subject: [PATCH] refac --- backend/open_webui/config.py | 5 ++++ backend/open_webui/routers/users.py | 1 + .../admin/Users/Groups/Permissions.svelte | 23 +++++++++++++++++++ src/lib/constants/permissions.ts | 1 + 4 files changed, 30 insertions(+) diff --git a/backend/open_webui/config.py b/backend/open_webui/config.py index e2db276e1..39510fb80 100644 --- a/backend/open_webui/config.py +++ b/backend/open_webui/config.py @@ -1300,6 +1300,10 @@ USER_PERMISSIONS_WORKSPACE_TOOLS_ACCESS = ( os.environ.get("USER_PERMISSIONS_WORKSPACE_TOOLS_ACCESS", "False").lower() == "true" ) +USER_PERMISSIONS_WORKSPACE_SKILLS_ACCESS = ( + os.environ.get("USER_PERMISSIONS_WORKSPACE_SKILLS_ACCESS", "False").lower() == "true" +) + USER_PERMISSIONS_WORKSPACE_MODELS_IMPORT = ( os.environ.get("USER_PERMISSIONS_WORKSPACE_MODELS_IMPORT", "False").lower() == "true" @@ -1521,6 +1525,7 @@ DEFAULT_USER_PERMISSIONS = { "knowledge": USER_PERMISSIONS_WORKSPACE_KNOWLEDGE_ACCESS, "prompts": USER_PERMISSIONS_WORKSPACE_PROMPTS_ACCESS, "tools": USER_PERMISSIONS_WORKSPACE_TOOLS_ACCESS, + "skills": USER_PERMISSIONS_WORKSPACE_SKILLS_ACCESS, "models_import": USER_PERMISSIONS_WORKSPACE_MODELS_IMPORT, "models_export": USER_PERMISSIONS_WORKSPACE_MODELS_EXPORT, "prompts_import": USER_PERMISSIONS_WORKSPACE_PROMPTS_IMPORT, diff --git a/backend/open_webui/routers/users.py b/backend/open_webui/routers/users.py index cc5fd07d9..87dbf1f87 100644 --- a/backend/open_webui/routers/users.py +++ b/backend/open_webui/routers/users.py @@ -172,6 +172,7 @@ class WorkspacePermissions(BaseModel): knowledge: bool = False prompts: bool = False tools: bool = False + skills: bool = False models_import: bool = False models_export: bool = False prompts_import: bool = False diff --git a/src/lib/components/admin/Users/Groups/Permissions.svelte b/src/lib/components/admin/Users/Groups/Permissions.svelte index 3284f6171..24be0bd37 100644 --- a/src/lib/components/admin/Users/Groups/Permissions.svelte +++ b/src/lib/components/admin/Users/Groups/Permissions.svelte @@ -158,6 +158,29 @@ {/if} + +
+ +
+ {$i18n.t('Skills Access')} +
+ +
+ + {#if defaultPermissions?.workspace?.skills && !permissions.workspace.skills} +
+
+ {$i18n.t('This is a default user permission and will remain enabled.')} +
+
+ {/if} +

diff --git a/src/lib/constants/permissions.ts b/src/lib/constants/permissions.ts index 58a362aad..205bd5e0f 100644 --- a/src/lib/constants/permissions.ts +++ b/src/lib/constants/permissions.ts @@ -4,6 +4,7 @@ export const DEFAULT_PERMISSIONS = { knowledge: false, prompts: false, tools: false, + skills: false, models_import: false, models_export: false, prompts_import: false,