feat: add granular import/export permissions for workspace items (#19242)
* feat: add granular import/export permissions for workspace items (#55) Co-authored-by: Claude <noreply@anthropic.com> * Fix permissions toggles not saving in EditGroupModal (#58) Co-authored-by: Claude <noreply@anthropic.com> * Fix permissions toggles not saving in EditGroupModal (#59) Co-authored-by: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -39,13 +39,20 @@
|
||||
models: false,
|
||||
knowledge: false,
|
||||
prompts: false,
|
||||
tools: false
|
||||
tools: false,
|
||||
models_import: false,
|
||||
models_export: false,
|
||||
prompts_import: false,
|
||||
prompts_export: false,
|
||||
tools_import: false,
|
||||
tools_export: false
|
||||
},
|
||||
sharing: {
|
||||
public_models: false,
|
||||
public_knowledge: false,
|
||||
public_prompts: false,
|
||||
public_tools: false
|
||||
public_tools: false,
|
||||
public_notes: false
|
||||
},
|
||||
chat: {
|
||||
controls: true,
|
||||
@@ -72,7 +79,8 @@
|
||||
direct_tool_servers: false,
|
||||
web_search: true,
|
||||
image_generation: true,
|
||||
code_interpreter: true
|
||||
code_interpreter: true,
|
||||
notes: true
|
||||
}
|
||||
};
|
||||
export let userIds = [];
|
||||
|
||||
@@ -11,7 +11,13 @@
|
||||
models: false,
|
||||
knowledge: false,
|
||||
prompts: false,
|
||||
tools: false
|
||||
tools: false,
|
||||
models_import: false,
|
||||
models_export: false,
|
||||
prompts_import: false,
|
||||
prompts_export: false,
|
||||
tools_import: false,
|
||||
tools_export: false
|
||||
},
|
||||
sharing: {
|
||||
public_models: false,
|
||||
@@ -97,6 +103,23 @@
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{#if permissions.workspace.models}
|
||||
<div class="ml-4 flex flex-col gap-1 mt-1">
|
||||
<div class="flex w-full justify-between my-1">
|
||||
<div class="self-center text-xs">
|
||||
{$i18n.t('Import Models')}
|
||||
</div>
|
||||
<Switch bind:state={permissions.workspace.models_import} />
|
||||
</div>
|
||||
<div class="flex w-full justify-between my-1">
|
||||
<div class="self-center text-xs">
|
||||
{$i18n.t('Export Models')}
|
||||
</div>
|
||||
<Switch bind:state={permissions.workspace.models_export} />
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col w-full">
|
||||
@@ -129,6 +152,23 @@
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{#if permissions.workspace.prompts}
|
||||
<div class="ml-4 flex flex-col gap-1 mt-1">
|
||||
<div class="flex w-full justify-between my-1">
|
||||
<div class="self-center text-xs">
|
||||
{$i18n.t('Import Prompts')}
|
||||
</div>
|
||||
<Switch bind:state={permissions.workspace.prompts_import} />
|
||||
</div>
|
||||
<div class="flex w-full justify-between my-1">
|
||||
<div class="self-center text-xs">
|
||||
{$i18n.t('Export Prompts')}
|
||||
</div>
|
||||
<Switch bind:state={permissions.workspace.prompts_export} />
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col w-full">
|
||||
@@ -151,6 +191,23 @@
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{#if permissions.workspace.tools}
|
||||
<div class="ml-4 flex flex-col gap-1 mt-1">
|
||||
<div class="flex w-full justify-between my-1">
|
||||
<div class="self-center text-xs">
|
||||
{$i18n.t('Import Tools')}
|
||||
</div>
|
||||
<Switch bind:state={permissions.workspace.tools_import} />
|
||||
</div>
|
||||
<div class="flex w-full justify-between my-1">
|
||||
<div class="self-center text-xs">
|
||||
{$i18n.t('Export Tools')}
|
||||
</div>
|
||||
<Switch bind:state={permissions.workspace.tools_export} />
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user