From 8184492a4fa243d65ef88179135d207e762d89c2 Mon Sep 17 00:00:00 2001 From: pavelbannov Date: Fri, 20 Sep 2019 18:08:45 +0300 Subject: [PATCH] DI: ConfigurationManager --- .../Middleware/IpSecurityFilter.cs | 5 ++- .../Billing/License/LicenseReader.cs | 31 +++++++--------- .../ASC.Core.Common/Billing/TariffService.cs | 10 +++-- common/ASC.Core.Common/Context/CoreContext.cs | 9 +++-- .../Context/Impl/CoreConfiguration.cs | 19 +++++----- .../Context/Impl/PaymentManager.cs | 17 +++++---- common/ASC.Core.Common/HostedSolution.cs | 9 +++-- .../Tests/ClientPaymentManagerTest.cs | 2 +- .../Tests/TariffServiceTest.cs | 7 ++-- common/ASC.IPSecurity/IPSecurity.cs | 37 +++++++++++-------- products/ASC.People/Server/Startup.cs | 4 +- web/ASC.Web.Core/Users/UserManagerWrapper.cs | 7 +++- web/ASC.Web.Core/Utility/TenantExtra.cs | 5 ++- 13 files changed, 91 insertions(+), 71 deletions(-) diff --git a/common/ASC.Api.Core/Middleware/IpSecurityFilter.cs b/common/ASC.Api.Core/Middleware/IpSecurityFilter.cs index 3717ecd2a4..a0b82bf305 100644 --- a/common/ASC.Api.Core/Middleware/IpSecurityFilter.cs +++ b/common/ASC.Api.Core/Middleware/IpSecurityFilter.cs @@ -15,16 +15,19 @@ namespace ASC.Api.Core.Middleware LogManager logManager, AuthContext authContext, IPRestrictionsSettings iPRestrictionsSettings, + IPSecurity.IPSecurity IPSecurity, TenantManager tenantManager) { log = logManager.Get("Api"); AuthContext = authContext; IPRestrictionsSettings = iPRestrictionsSettings; + this.IPSecurity = IPSecurity; TenantManager = tenantManager; } public AuthContext AuthContext { get; } public IPRestrictionsSettings IPRestrictionsSettings { get; } + public IPSecurity.IPSecurity IPSecurity { get; } public TenantManager TenantManager { get; } public void OnResourceExecuted(ResourceExecutedContext context) @@ -35,7 +38,7 @@ namespace ASC.Api.Core.Middleware { var tenant = TenantManager.GetCurrentTenant(); var settings = IPRestrictionsSettings.Load(); - if (settings.Enable && AuthContext.IsAuthenticated && !IPSecurity.IPSecurity.Verify(context.HttpContext, tenant, AuthContext)) + if (settings.Enable && AuthContext.IsAuthenticated && !IPSecurity.Verify(tenant)) { context.Result = new StatusCodeResult((int)HttpStatusCode.Forbidden); log.WarnFormat("IPSecurity: Tenant {0}, user {1}", tenant.TenantId, AuthContext.CurrentAccount.ID); diff --git a/common/ASC.Core.Common/Billing/License/LicenseReader.cs b/common/ASC.Core.Common/Billing/License/LicenseReader.cs index def0dcc791..6fff6790c5 100644 --- a/common/ASC.Core.Common/Billing/License/LicenseReader.cs +++ b/common/ASC.Core.Common/Billing/License/LicenseReader.cs @@ -31,35 +31,31 @@ using System.Security.Cryptography; using System.Text; using ASC.Common.Logging; -using ASC.Common.Utils; using ASC.Core.Tenants; using ASC.Core.Users; using Microsoft.AspNetCore.WebUtilities; - +using Microsoft.Extensions.Configuration; + namespace ASC.Core.Billing { public class LicenseReader { private static readonly ILog Log = LogManager.GetLogger("ASC"); - private static readonly string LicensePath; - private static readonly string LicensePathTemp; + private readonly string LicensePath; + private readonly string LicensePathTemp; public const string CustomerIdKey = "CustomerId"; public const int MaxUserCount = 10000; - - - static LicenseReader() - { - LicensePath = ConfigurationManager.AppSettings["license:file:path"]; - LicensePathTemp = LicensePath + ".tmp"; - } - public LicenseReader(UserManager userManager, TenantManager tenantManager, PaymentManager paymentManager, CoreSettings coreSettings) + public LicenseReader(UserManager userManager, TenantManager tenantManager, PaymentManager paymentManager, CoreSettings coreSettings, IConfiguration configuration) { UserManager = userManager; TenantManager = tenantManager; PaymentManager = paymentManager; CoreSettings = coreSettings; + Configuration = configuration; + LicensePath = Configuration["license:file:path"]; + LicensePathTemp = LicensePath + ".tmp"; } public string CustomerId @@ -68,7 +64,7 @@ namespace ASC.Core.Billing private set { CoreSettings.SaveSetting(CustomerIdKey, value); } } - private static Stream GetLicenseStream(bool temp = false) + private Stream GetLicenseStream(bool temp = false) { var path = temp ? LicensePathTemp : LicensePath; if (!File.Exists(path)) throw new BillingNotFoundException("License not found"); @@ -272,7 +268,7 @@ namespace ASC.Core.Billing private static DateTime _date = DateTime.MinValue; - public static DateTime VersionReleaseDate + public DateTime VersionReleaseDate { get { @@ -281,8 +277,8 @@ namespace ASC.Core.Billing _date = DateTime.MaxValue; try { - var versionDate = ConfigurationManager.AppSettings["version:release:date"]; - var sign = ConfigurationManager.AppSettings["version:release:sign"]; + var versionDate = Configuration["version:release:date"]; + var sign = Configuration["version:release:sign"]; if (!sign.StartsWith("ASC ")) { @@ -299,7 +295,7 @@ namespace ASC.Core.Billing var date = splitted[1]; var orighash = splitted[2]; - var skey = ConfigurationManager.AppSettings["core:machinekey"]; + var skey = Configuration["core:machinekey"]; using (var hasher = new HMACSHA1(Encoding.UTF8.GetBytes(skey))) { @@ -328,5 +324,6 @@ namespace ASC.Core.Billing public TenantManager TenantManager { get; } public PaymentManager PaymentManager { get; } public CoreSettings CoreSettings { get; } + public IConfiguration Configuration { get; } } } \ No newline at end of file diff --git a/common/ASC.Core.Common/Billing/TariffService.cs b/common/ASC.Core.Common/Billing/TariffService.cs index 93a189482f..8a755ce1b9 100644 --- a/common/ASC.Core.Common/Billing/TariffService.cs +++ b/common/ASC.Core.Common/Billing/TariffService.cs @@ -39,7 +39,8 @@ using ASC.Common.Utils; using ASC.Core.Data; using ASC.Core.Tenants; - +using Microsoft.Extensions.Configuration; + namespace ASC.Core.Billing { public class TariffService : DbBaseService, ITariffService @@ -96,7 +97,8 @@ namespace ASC.Core.Billing IQuotaService quotaService, ITenantService tenantService, CoreBaseSettings coreBaseSettings, - CoreSettings coreSettings) + CoreSettings coreSettings, + IConfiguration configuration) : base(connectionString, "tenant") { this.quotaService = quotaService; @@ -104,8 +106,8 @@ namespace ASC.Core.Billing CoreSettings = coreSettings; CoreBaseSettings = coreBaseSettings; CacheExpiration = DEFAULT_CACHE_EXPIRATION; - test = ConfigurationManager.AppSettings["core:payment:test"] == "true"; - int.TryParse(ConfigurationManager.AppSettings["core:payment:delay"], out paymentDelay); + test = configuration["core:payment:test"] == "true"; + int.TryParse(configuration["core:payment:delay"], out paymentDelay); } diff --git a/common/ASC.Core.Common/Context/CoreContext.cs b/common/ASC.Core.Common/Context/CoreContext.cs index 12f7058c76..95b4a3c65c 100644 --- a/common/ASC.Core.Common/Context/CoreContext.cs +++ b/common/ASC.Core.Common/Context/CoreContext.cs @@ -67,14 +67,15 @@ namespace ASC.Core throw new ConfigurationErrorsException("Can not configure CoreContext: connection string with name core not found."); } - var coreBaseSettings = new CoreBaseSettings(CommonServiceProvider.GetService()); + var configuration = CommonServiceProvider.GetService(); + var coreBaseSettings = new CoreBaseSettings(configuration); var tenantService = new CachedTenantService(new DbTenantService(cs), coreBaseSettings); - var coreSettings = new CoreSettings(tenantService, coreBaseSettings); + var coreSettings = new CoreSettings(tenantService, coreBaseSettings, configuration); var quotaService = QuotaCacheEnabled ? (IQuotaService)new CachedQuotaService(new DbQuotaService(cs)) : new DbQuotaService(cs); - var tariffService = new TariffService(cs, quotaService, tenantService, coreBaseSettings, coreSettings); + var tariffService = new TariffService(cs, quotaService, tenantService, coreBaseSettings, coreSettings, configuration); TenantManager = new TenantManager(tenantService, quotaService, tariffService, null, coreBaseSettings, coreSettings); - Configuration = new CoreConfiguration(coreBaseSettings, coreSettings, TenantManager); + Configuration = new CoreConfiguration(coreBaseSettings, coreSettings, TenantManager, configuration); } } } \ No newline at end of file diff --git a/common/ASC.Core.Common/Context/Impl/CoreConfiguration.cs b/common/ASC.Core.Common/Context/Impl/CoreConfiguration.cs index c3df52b0b7..52e87f7ff3 100644 --- a/common/ASC.Core.Common/Context/Impl/CoreConfiguration.cs +++ b/common/ASC.Core.Common/Context/Impl/CoreConfiguration.cs @@ -73,7 +73,7 @@ namespace ASC.Core { if (basedomain == null) { - basedomain = ConfigurationManager.AppSettings["core:base-domain"] ?? string.Empty; + basedomain = Configuration["core:base-domain"] ?? string.Empty; } string result; @@ -98,11 +98,13 @@ namespace ASC.Core public ITenantService TenantService { get; } public CoreBaseSettings CoreBaseSettings { get; } + public IConfiguration Configuration { get; } - public CoreSettings(ITenantService tenantService, CoreBaseSettings coreBaseSettings) + public CoreSettings(ITenantService tenantService, CoreBaseSettings coreBaseSettings, IConfiguration configuration) { TenantService = tenantService; CoreBaseSettings = coreBaseSettings; + Configuration = configuration; } public void SaveSetting(string key, string value, int tenant = Tenant.DEFAULT_TENANT) @@ -157,7 +159,7 @@ namespace ASC.Core if (t != null && !string.IsNullOrWhiteSpace(t.PaymentId)) return t.PaymentId; - return ConfigurationManager.AppSettings["core:payment:region"] + tenant; + return Configuration["core:payment:region"] + tenant; } } @@ -175,11 +177,12 @@ namespace ASC.Core { private long? personalMaxSpace; - public CoreConfiguration(CoreBaseSettings coreBaseSettings, CoreSettings coreSettings, TenantManager tenantManager) + public CoreConfiguration(CoreBaseSettings coreBaseSettings, CoreSettings coreSettings, TenantManager tenantManager, IConfiguration configuration) { CoreBaseSettings = coreBaseSettings; CoreSettings = coreSettings; TenantManager = tenantManager; + Configuration = configuration; } public bool Standalone @@ -192,11 +195,6 @@ namespace ASC.Core get => CoreBaseSettings.Personal; } - public bool CustomMode - { - get => CoreBaseSettings.CustomMode; - } - public long PersonalMaxSpace(PersonalQuotaSettings personalQuotaSettings) { var quotaSettings = personalQuotaSettings.LoadForCurrentUser(); @@ -208,7 +206,7 @@ namespace ASC.Core return personalMaxSpace.Value; - if (!long.TryParse(ConfigurationManager.AppSettings["core.personal.maxspace"], out var value)) + if (!long.TryParse(Configuration["core.personal.maxspace"], out var value)) value = long.MaxValue; personalMaxSpace = value; @@ -256,6 +254,7 @@ namespace ASC.Core public CoreBaseSettings CoreBaseSettings { get; } public CoreSettings CoreSettings { get; } public TenantManager TenantManager { get; } + public IConfiguration Configuration { get; } #region Methods Get/Save Setting diff --git a/common/ASC.Core.Common/Context/Impl/PaymentManager.cs b/common/ASC.Core.Common/Context/Impl/PaymentManager.cs index 346043c011..075b6d5bf2 100644 --- a/common/ASC.Core.Common/Context/Impl/PaymentManager.cs +++ b/common/ASC.Core.Common/Context/Impl/PaymentManager.cs @@ -39,6 +39,7 @@ using ASC.Common.Utils; using ASC.Core.Billing; using ASC.Core.Users; using Microsoft.AspNetCore.WebUtilities; +using Microsoft.Extensions.Configuration; using Newtonsoft.Json; @@ -52,16 +53,18 @@ namespace ASC.Core private readonly string partnerUrl; private readonly string partnerKey; - public TenantManager TenantManager { get; } - - public PaymentManager(CoreSettings config, TenantManager tenantManager, IQuotaService quotaService, ITariffService tariffService) + public TenantManager TenantManager { get; } + public IConfiguration Configuration { get; } + + public PaymentManager(CoreSettings config, TenantManager tenantManager, IQuotaService quotaService, ITariffService tariffService, IConfiguration configuration) { this.config = config; TenantManager = tenantManager; this.quotaService = quotaService; - this.tariffService = tariffService; - partnerUrl = (ConfigurationManager.AppSettings["core:payment:partners"] ?? "https://partners.onlyoffice.com/api").TrimEnd('/'); - partnerKey = (ConfigurationManager.AppSettings["core:machinekey"] ?? "C5C1F4E85A3A43F5B3202C24D97351DF"); + this.tariffService = tariffService; + Configuration = configuration; + partnerUrl = (Configuration["core:payment:partners"] ?? "https://partners.onlyoffice.com/api").TrimEnd('/'); + partnerKey = (Configuration["core:machinekey"] ?? "C5C1F4E85A3A43F5B3202C24D97351DF"); } @@ -115,7 +118,7 @@ namespace ASC.Core var trial = quotaService.GetTenantQuotas().FirstOrDefault(q => q.Trial); if (trial != null) { - var uri = ConfigurationManager.AppSettings["core:payment:request"] ?? "http://billing.onlyoffice.com/avangate/requestatrialversion.aspx"; + var uri = Configuration["core:payment:request"] ?? "http://billing.onlyoffice.com/avangate/requestatrialversion.aspx"; uri += uri.Contains('?') ? "&" : "?"; uri += "FIRSTNAME=" + HttpUtility.UrlEncode(user.FirstName) + "&LASTNAME=" + HttpUtility.UrlEncode(user.FirstName) + diff --git a/common/ASC.Core.Common/HostedSolution.cs b/common/ASC.Core.Common/HostedSolution.cs index 7fb6be564b..7c83516a29 100644 --- a/common/ASC.Core.Common/HostedSolution.cs +++ b/common/ASC.Core.Common/HostedSolution.cs @@ -67,14 +67,15 @@ namespace ASC.Core } public HostedSolution(ConnectionStringSettings connectionString, string region) - { + { + var configuration = CommonServiceProvider.GetService(); tenantService = new DbTenantService(connectionString); - var baseSettings = new CoreBaseSettings(CommonServiceProvider.GetService()); - var coreSettings = new CoreSettings(tenantService, baseSettings); + var baseSettings = new CoreBaseSettings(configuration); + var coreSettings = new CoreSettings(tenantService, baseSettings, configuration); userService = new DbUserService(connectionString); quotaService = new DbQuotaService(connectionString); - tariffService = new TariffService(connectionString, quotaService, tenantService, baseSettings, coreSettings); + tariffService = new TariffService(connectionString, quotaService, tenantService, baseSettings, coreSettings, configuration); clientTenantManager = new TenantManager(tenantService, quotaService, tariffService, null, baseSettings, coreSettings); settingsManager = new DbSettingsManager(connectionString); Region = region ?? string.Empty; diff --git a/common/ASC.Core.Common/Tests/ClientPaymentManagerTest.cs b/common/ASC.Core.Common/Tests/ClientPaymentManagerTest.cs index 5b431e92d2..2e38bcaeb0 100644 --- a/common/ASC.Core.Common/Tests/ClientPaymentManagerTest.cs +++ b/common/ASC.Core.Common/Tests/ClientPaymentManagerTest.cs @@ -34,7 +34,7 @@ namespace ASC.Core.Common.Tests [TestFixture] public class ClientPaymentManagerTest { - private readonly PaymentManager paymentManager = new PaymentManager(null, null, null, null); + private readonly PaymentManager paymentManager = new PaymentManager(null, null, null, null, null); private IServiceProvider serviceProvider; [Test] diff --git a/common/ASC.Core.Common/Tests/TariffServiceTest.cs b/common/ASC.Core.Common/Tests/TariffServiceTest.cs index 80f989972d..d4c5862954 100644 --- a/common/ASC.Core.Common/Tests/TariffServiceTest.cs +++ b/common/ASC.Core.Common/Tests/TariffServiceTest.cs @@ -42,11 +42,12 @@ namespace ASC.Core.Common.Tests public TariffServiceTest() - { + { + var configuration = CommonServiceProvider.GetService(); var cs = ConfigurationManager.ConnectionStrings["core"]; var tenantService = new DbTenantService(cs); - var baseSettings = new CoreBaseSettings(CommonServiceProvider.GetService()); - tariffService = new TariffService(cs, new DbQuotaService(cs), tenantService, baseSettings, new CoreSettings(tenantService, baseSettings)); + var baseSettings = new CoreBaseSettings(configuration); + tariffService = new TariffService(cs, new DbQuotaService(cs), tenantService, baseSettings, new CoreSettings(tenantService, baseSettings, configuration), configuration); } diff --git a/common/ASC.IPSecurity/IPSecurity.cs b/common/ASC.IPSecurity/IPSecurity.cs index 20a7c8f86e..35d8fae794 100644 --- a/common/ASC.IPSecurity/IPSecurity.cs +++ b/common/ASC.IPSecurity/IPSecurity.cs @@ -34,34 +34,39 @@ using ASC.Core; using ASC.Core.Tenants; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http.Extensions; +using Microsoft.Extensions.Configuration; namespace ASC.IPSecurity { - public static class IPSecurity + public class IPSecurity { private static readonly ILog Log = LogManager.GetLogger("ASC.IPSecurity"); - private static bool? _ipSecurityEnabled; + public bool IpSecurityEnabled { get; } - public static bool IpSecurityEnabled + public IConfiguration Configuration { get; } + public IHttpContextAccessor HttpContextAccessor { get; } + public AuthContext AuthContext { get; } + + private readonly string CurrentIpForTest; + + public IPSecurity(IConfiguration configuration, IHttpContextAccessor httpContextAccessor, AuthContext authContext) { - get - { - if (_ipSecurityEnabled.HasValue) return _ipSecurityEnabled.Value; - var hideSettings = (ConfigurationManager.AppSettings["web.hide-settings"] ?? "").Split(new[] { ',', ';', ' ' }); - return (_ipSecurityEnabled = !hideSettings.Contains("IpSecurity", StringComparer.CurrentCultureIgnoreCase)).Value; - } + Configuration = configuration; + HttpContextAccessor = httpContextAccessor; + AuthContext = authContext; + CurrentIpForTest = configuration["ipsecurity:test"]; + var hideSettings = (configuration["web:hide-settings"] ?? "").Split(new[] { ',', ';', ' ' }); + IpSecurityEnabled = !hideSettings.Contains("IpSecurity", StringComparer.CurrentCultureIgnoreCase); } - private static readonly string CurrentIpForTest = ConfigurationManager.AppSettings["ipsecurity.test"]; - - public static bool Verify(HttpContext httpContext, Tenant tenant, AuthContext authContext) + public bool Verify(Tenant tenant) { if (!IpSecurityEnabled) return true; - if (httpContext == null) return true; + if (HttpContextAccessor?.HttpContext == null) return true; - if (tenant == null || authContext.CurrentAccount.ID == tenant.OwnerId) return true; + if (tenant == null || AuthContext.CurrentAccount.ID == tenant.OwnerId) return true; string requestIps = null; try @@ -72,7 +77,7 @@ namespace ASC.IPSecurity if (string.IsNullOrWhiteSpace(requestIps = CurrentIpForTest)) { - var request = httpContext.Request; + var request = HttpContextAccessor.HttpContext.Request; requestIps = request.Headers["X-Forwarded-For"].FirstOrDefault() ?? request.GetUserHostAddress(); } @@ -91,7 +96,7 @@ namespace ASC.IPSecurity return false; } - Log.InfoFormat("Restricted from IP-address: {0}. Tenant: {1}. Request to: {2}", requestIps ?? "", tenant, httpContext.Request.GetDisplayUrl()); + Log.InfoFormat("Restricted from IP-address: {0}. Tenant: {1}. Request to: {2}", requestIps ?? "", tenant, HttpContextAccessor.HttpContext.Request.GetDisplayUrl()); return false; } diff --git a/products/ASC.People/Server/Startup.cs b/products/ASC.People/Server/Startup.cs index a5f6262a6d..d7780c9566 100644 --- a/products/ASC.People/Server/Startup.cs +++ b/products/ASC.People/Server/Startup.cs @@ -162,7 +162,7 @@ namespace ASC.People { throw new ConfigurationErrorsException("Can not configure CoreContext: connection string with name core not found."); } - return (ITariffService)new TariffService(cs, r.GetService(), r.GetService(), r.GetService(), r.GetService()); + return (ITariffService)new TariffService(cs, r.GetService(), r.GetService(), r.GetService(), r.GetService(), Configuration); }) .AddScoped() .AddScoped() @@ -213,11 +213,13 @@ namespace ASC.People .AddScoped() .AddScoped() .AddScoped() + .AddScoped() .AddSingleton() .AddSingleton() .AddSingleton() .AddSingleton() .AddScoped() + .AddScoped() .AddScoped(typeof(IRecipientProvider), typeof(RecipientProviderImpl)) .AddSingleton(typeof(IRoleProvider), typeof(RoleProvider)) .AddScoped(typeof(IPermissionResolver), typeof(PermissionResolver)) diff --git a/web/ASC.Web.Core/Users/UserManagerWrapper.cs b/web/ASC.Web.Core/Users/UserManagerWrapper.cs index 51b2f2f314..5df507c1be 100644 --- a/web/ASC.Web.Core/Users/UserManagerWrapper.cs +++ b/web/ASC.Web.Core/Users/UserManagerWrapper.cs @@ -58,6 +58,7 @@ namespace ASC.Web.Core.Users public CustomNamingPeople CustomNamingPeople { get; } public TenantUtil TenantUtil { get; } public CoreBaseSettings CoreBaseSettings { get; } + public IPSecurity.IPSecurity IPSecurity { get; } private Tenant tenant; public Tenant Tenant { get { return tenant ?? (tenant = TenantManager.GetCurrentTenant()); } } @@ -74,7 +75,8 @@ namespace ASC.Web.Core.Users IHttpContextAccessor httpContextAccessor, CustomNamingPeople customNamingPeople, TenantUtil tenantUtil, - CoreBaseSettings coreBaseSettings + CoreBaseSettings coreBaseSettings, + IPSecurity.IPSecurity iPSecurity ) { StudioNotifyService = studioNotifyService; @@ -89,6 +91,7 @@ namespace ASC.Web.Core.Users CustomNamingPeople = customNamingPeople; TenantUtil = tenantUtil; CoreBaseSettings = coreBaseSettings; + IPSecurity = iPSecurity; } private bool TestUniqueUserName(string uniqueName) @@ -215,7 +218,7 @@ namespace ASC.Web.Core.Users var tenant = TenantManager.GetCurrentTenant(); var settings = IPRestrictionsSettings.Load(); - if (settings.Enable && !IPSecurity.IPSecurity.Verify(HttpContextAccessor.HttpContext, tenant, AuthContext)) + if (settings.Enable && !IPSecurity.Verify(tenant)) { throw new Exception(Resource.ErrorAccessRestricted); } diff --git a/web/ASC.Web.Core/Utility/TenantExtra.cs b/web/ASC.Web.Core/Utility/TenantExtra.cs index 5a2e2b3c41..5c8a9e3026 100644 --- a/web/ASC.Web.Core/Utility/TenantExtra.cs +++ b/web/ASC.Web.Core/Utility/TenantExtra.cs @@ -48,6 +48,7 @@ namespace ASC.Web.Studio.Utility public TenantManager TenantManager { get; } public PaymentManager PaymentManager { get; } public CoreBaseSettings CoreBaseSettings { get; } + public LicenseReader LicenseReader { get; } public TenantExtra( UserManager userManager, @@ -56,7 +57,8 @@ namespace ASC.Web.Studio.Utility TenantAccessSettings tenantAccessSettings, TenantManager tenantManager, PaymentManager paymentManager, - CoreBaseSettings coreBaseSettings) + CoreBaseSettings coreBaseSettings, + LicenseReader licenseReader) { UserManager = userManager; TenantStatisticsProvider = tenantStatisticsProvider; @@ -65,6 +67,7 @@ namespace ASC.Web.Studio.Utility TenantManager = tenantManager; PaymentManager = paymentManager; CoreBaseSettings = coreBaseSettings; + LicenseReader = licenseReader; } public bool EnableTarrifSettings