diff --git a/app/MindWork AI Studio/Plugins/configuration/plugin.lua b/app/MindWork AI Studio/Plugins/configuration/plugin.lua index 0e5d5998..24738d3f 100644 --- a/app/MindWork AI Studio/Plugins/configuration/plugin.lua +++ b/app/MindWork AI Studio/Plugins/configuration/plugin.lua @@ -278,6 +278,13 @@ CONFIG["SETTINGS"] = {} -- When set to false, the import button on the plugins page stays visible but is disabled. -- CONFIG["SETTINGS"]["DataApp.AllowUserToImportPlugins"] = false +-- Configure the user permission to import configuration plugin archives from disk. +-- This is a second gate on top of DataApp.AllowUserToImportPlugins: both must allow the +-- import. Configuration plugins get their own switch because they can do far more than an +-- assistant: they define LLM providers and data sources, and they lock settings. You may +-- therefore let users import assistants while keeping configurations to your IT department. +-- CONFIG["SETTINGS"]["DataApp.AllowUserToImportConfigurationPlugins"] = false + -- Configure the user permission to share or export plugins as archives. -- When set to false, the share button on the plugins page stays visible but is disabled. -- On Linux, this button exports the plugin archive instead of using a native share sheet. diff --git a/app/MindWork AI Studio/Settings/DataModel/DataApp.cs b/app/MindWork AI Studio/Settings/DataModel/DataApp.cs index bd26dfd7..7808f0c9 100644 --- a/app/MindWork AI Studio/Settings/DataModel/DataApp.cs +++ b/app/MindWork AI Studio/Settings/DataModel/DataApp.cs @@ -154,6 +154,16 @@ public sealed class DataApp(Expression>? configSelection = n /// public bool AllowUserToImportPlugins { get; set; } = ManagedConfiguration.Register(configSelection, n => n.AllowUserToImportPlugins, true); + /// + /// Should the user be allowed to import configuration plugin archives from disk? + /// + /// + /// This is a second gate on top of AllowUserToImportPlugins, and both must allow the import. + /// Configuration plugins deserve their own switch because they are far more powerful than an + /// assistant: they define LLM providers and data sources, and they lock settings. + /// + public bool AllowUserToImportConfigurationPlugins { get; set; } = ManagedConfiguration.Register(configSelection, n => n.AllowUserToImportConfigurationPlugins, true); + /// /// Should the user be allowed to share or export plugins as archives? /// diff --git a/app/MindWork AI Studio/Tools/PluginSystem/PluginConfiguration.cs b/app/MindWork AI Studio/Tools/PluginSystem/PluginConfiguration.cs index 319f9cd8..e0fa49dd 100644 --- a/app/MindWork AI Studio/Tools/PluginSystem/PluginConfiguration.cs +++ b/app/MindWork AI Studio/Tools/PluginSystem/PluginConfiguration.cs @@ -201,6 +201,9 @@ public sealed class PluginConfiguration(bool isInternal, LuaState state, PluginT // Config: allow the user to import plugin archives? ManagedConfiguration.TryProcessConfiguration(x => x.App, x => x.AllowUserToImportPlugins, this.Id, settingsTable, dryRun); + // Config: allow the user to import configuration plugin archives? + ManagedConfiguration.TryProcessConfiguration(x => x.App, x => x.AllowUserToImportConfigurationPlugins, this.Id, settingsTable, dryRun); + // Config: allow the user to share or export plugins? ManagedConfiguration.TryProcessConfiguration(x => x.App, x => x.AllowUserToSharePlugins, this.Id, settingsTable, dryRun); diff --git a/app/MindWork AI Studio/wwwroot/changelog/v26.8.1.md b/app/MindWork AI Studio/wwwroot/changelog/v26.8.1.md index 2c54a081..89a9dc57 100644 --- a/app/MindWork AI Studio/wwwroot/changelog/v26.8.1.md +++ b/app/MindWork AI Studio/wwwroot/changelog/v26.8.1.md @@ -6,6 +6,7 @@ - Added the option to import plugins by dropping a plugin archive onto the plugin page. - Added the dedicated file extension `.mwplugin` for plugin archives. - Added an option for organizations to disable importing, sharing, and exporting plugins. +- Added a separate option for organizations to disable importing configuration plugins. Organizations can now let people import assistants while keeping configurations to their IT department. - Added a delete button for configuration plugins you placed yourself. Until now, such a plugin could only be removed from the data directory by hand, because configuration plugins have no on/off switch. Before deleting, AI Studio lists what disappears with it, such as providers, data sources, and settings that return to their default. Configurations deployed by your IT department cannot be deleted. - Added a priority for configuration plugins. Organizations that deploy several configurations can now decide which one wins: a configuration with a higher priority overrides the settings and providers of a lower one. This allows a company-wide base configuration that each department refines for itself. - Improved how your organization's configuration behaves when a configuration plugin is present but cannot be loaded, e.g. because of an error in the plugin. Such a plugin still manages your app, so its settings, providers, data sources, profiles, and chat templates now stay in place instead of being removed.