diff --git a/web/ASC.Web.Api/Api/Settings/SettingsController.cs b/web/ASC.Web.Api/Api/Settings/SettingsController.cs index 8dbda25d75c..7e4efd35cc7 100644 --- a/web/ASC.Web.Api/Api/Settings/SettingsController.cs +++ b/web/ASC.Web.Api/Api/Settings/SettingsController.cs @@ -228,14 +228,14 @@ public async Task GetSettingsAsync(bool? withpassword) settings.Plugins.Enabled = pluginsEnabled; } - if (bool.TryParse(_configuration["plugins:allowUpload"], out var pluginsAllowUpload)) + if (bool.TryParse(_configuration["plugins:upload"], out var pluginsUpload)) { - settings.Plugins.AllowUpload = pluginsAllowUpload; + settings.Plugins.Upload = pluginsUpload; } - if (bool.TryParse(_configuration["plugins:allowDelete"], out var pluginsAllowDelete)) + if (bool.TryParse(_configuration["plugins:delete"], out var pluginsDelete)) { - settings.Plugins.AllowDelete = pluginsAllowDelete; + settings.Plugins.Delete = pluginsDelete; } var formGallerySettings = _configurationExtension.GetSetting("files:oform"); diff --git a/web/ASC.Web.Api/ApiModels/ResponseDto/PluginsDto.cs b/web/ASC.Web.Api/ApiModels/ResponseDto/PluginsDto.cs index e488385dfb0..f8d66f26461 100644 --- a/web/ASC.Web.Api/ApiModels/ResponseDto/PluginsDto.cs +++ b/web/ASC.Web.Api/ApiModels/ResponseDto/PluginsDto.cs @@ -36,9 +36,9 @@ public class PluginsDto /// Specifies if the plugins can be uploaded or not /// System.Boolean, System - public bool AllowUpload { get; set; } + public bool Upload { get; set; } /// Specifies if the plugins can be deleted or not /// System.Boolean, System - public bool AllowDelete { get; set; } + public bool Delete { get; set; } } \ No newline at end of file diff --git a/web/ASC.Web.Core/WebPluginManager.cs b/web/ASC.Web.Core/WebPluginManager.cs index a97cab002e3..6451e4c44ce 100644 --- a/web/ASC.Web.Core/WebPluginManager.cs +++ b/web/ASC.Web.Core/WebPluginManager.cs @@ -131,7 +131,7 @@ private void DemandWebPlugins(bool upload = false, bool delete = false) throw new SecurityException("Plugins disabled"); } - if ((upload && !_webPluginConfigSettings.AllowUpload) || (delete && !_webPluginConfigSettings.AllowDelete)) + if ((upload && !_webPluginConfigSettings.Upload) || (delete && !_webPluginConfigSettings.Delete)) { throw new SecurityException("Forbidden action"); } diff --git a/web/ASC.Web.Core/WebPluginSettings.cs b/web/ASC.Web.Core/WebPluginSettings.cs index 698293d56db..b163db830a5 100644 --- a/web/ASC.Web.Core/WebPluginSettings.cs +++ b/web/ASC.Web.Core/WebPluginSettings.cs @@ -39,8 +39,8 @@ public WebPluginConfigSettings(ConfigurationExtension configuration) private string[] _assetExtensions; public bool Enabled { get; set; } - public bool AllowUpload { get; set; } - public bool AllowDelete { get; set; } + public bool Upload { get; set; } + public bool Delete { get; set; } public long MaxSize {