mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-08-24 20:52:11 +00:00
Added rejection of imported plugins claiming to be config server managed
This commit is contained in:
parent
111465b25e
commit
c5103485c4
@ -195,6 +195,12 @@ public sealed class AssistantPluginInstallService
|
|||||||
if (!validation.Success || validation.AssistantPlugin is null)
|
if (!validation.Success || validation.AssistantPlugin is null)
|
||||||
return Error(validation.Issue);
|
return Error(validation.Issue);
|
||||||
|
|
||||||
|
// A plugin the user imports by hand never comes from a config server. We reject such
|
||||||
|
// archives because AI Studio trusts this self-declared flag: an imported plugin
|
||||||
|
// claiming it would be neither replaceable nor deletable through the user interface:
|
||||||
|
if (validation.AssistantPlugin.IsManagedByConfigServer)
|
||||||
|
return Error(TB("This plugin archive declares itself as managed by a config server. Only the IT department of your organization might deploy such plugins."));
|
||||||
|
|
||||||
return await this.InstallStagedAssistantAsync(assistantPluginsRoot, validation with { StagingDirectory = pluginDirectory }, token);
|
return await this.InstallStagedAssistantAsync(assistantPluginsRoot, validation with { StagingDirectory = pluginDirectory }, token);
|
||||||
}
|
}
|
||||||
catch (Exception e) when (e is not OperationCanceledException)
|
catch (Exception e) when (e is not OperationCanceledException)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user