This commit is contained in:
Timothy Jaeryang Baek
2026-02-12 17:35:22 -06:00
parent f7af3f010e
commit 59afbd6f92
4 changed files with 30 additions and 0 deletions
+5
View File
@@ -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,
+1
View File
@@ -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
@@ -158,6 +158,29 @@
</div>
{/if}
</div>
<div class="flex flex-col w-full">
<Tooltip
className="flex w-full justify-between my-1"
content={$i18n.t(
'Warning: Enabling this will allow users to upload arbitrary code on the server.'
)}
placement="top-start"
>
<div class=" self-center text-xs font-medium">
{$i18n.t('Skills Access')}
</div>
<Switch bind:state={permissions.workspace.skills} />
</Tooltip>
{#if defaultPermissions?.workspace?.skills && !permissions.workspace.skills}
<div class="pb-0.5">
<div class="text-xs text-gray-500">
{$i18n.t('This is a default user permission and will remain enabled.')}
</div>
</div>
{/if}
</div>
</div>
<hr class=" border-gray-100/30 dark:border-gray-850/30" />
+1
View File
@@ -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,