mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-08-11 17:32:11 +00:00
Added an organization setting for importing configuration plugins
This commit is contained in:
parent
ffc5b8a882
commit
e0474e6ed5
@ -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.
|
||||
|
||||
@ -154,6 +154,16 @@ public sealed class DataApp(Expression<Func<Data, DataApp>>? configSelection = n
|
||||
/// </summary>
|
||||
public bool AllowUserToImportPlugins { get; set; } = ManagedConfiguration.Register(configSelection, n => n.AllowUserToImportPlugins, true);
|
||||
|
||||
/// <summary>
|
||||
/// Should the user be allowed to import configuration plugin archives from disk?
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 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.
|
||||
/// </remarks>
|
||||
public bool AllowUserToImportConfigurationPlugins { get; set; } = ManagedConfiguration.Register(configSelection, n => n.AllowUserToImportConfigurationPlugins, true);
|
||||
|
||||
/// <summary>
|
||||
/// Should the user be allowed to share or export plugins as archives?
|
||||
/// </summary>
|
||||
|
||||
@ -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);
|
||||
|
||||
|
||||
@ -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.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user