From 375853bf8e9b84404bd5b2e58376c4f2b3300d39 Mon Sep 17 00:00:00 2001 From: pavelbannov Date: Wed, 7 Sep 2022 19:35:07 +0300 Subject: [PATCH] Quota: removed hasMigrationFeature --- common/ASC.Core.Common/Tenants/TenantQuota.cs | 9 --------- common/ASC.Data.Backup.Core/BackupAjaxHandler.cs | 2 +- products/ASC.Files/Service/Thumbnail/FileDataProvider.cs | 2 +- 3 files changed, 2 insertions(+), 11 deletions(-) diff --git a/common/ASC.Core.Common/Tenants/TenantQuota.cs b/common/ASC.Core.Common/Tenants/TenantQuota.cs index cc9f3aeefd..50b5377515 100644 --- a/common/ASC.Core.Common/Tenants/TenantQuota.cs +++ b/common/ASC.Core.Common/Tenants/TenantQuota.cs @@ -140,13 +140,6 @@ public class TenantQuota : IMapFrom set => _docsEditionFeature.Value = value; } - private readonly TenantQuotaFeatureFlag _hasMigrationFeature; - public bool HasMigration - { - get => _hasMigrationFeature.Value; - set => _hasMigrationFeature.Value = value; - } - private readonly TenantQuotaFeatureFlag _ldapFeature; public bool Ldap { @@ -224,7 +217,6 @@ public class TenantQuota : IMapFrom _updateFeature = new TenantQuotaFeatureFlag(this) { Name = "update", Visible = false }; _auditFeature = new TenantQuotaFeatureFlag(this) { Name = "audit", Order = 7 }; _docsEditionFeature = new TenantQuotaFeatureFlag(this) { Name = "docs", Visible = false }; - _hasMigrationFeature = new TenantQuotaFeatureFlag(this) { Name = "migration", Visible = false }; _ldapFeature = new TenantQuotaFeatureFlag(this) { Name = "ldap", Visible = false }; _ssoFeature = new TenantQuotaFeatureFlag(this) { Name = "sso", Order = 5 }; _whiteLabelFeature = new TenantQuotaFeatureFlag(this) { Name = "whitelabel", Order = 4 }; @@ -247,7 +239,6 @@ public class TenantQuota : IMapFrom _updateFeature, _auditFeature, _docsEditionFeature, - _hasMigrationFeature, _ldapFeature, _ssoFeature, _whiteLabelFeature, diff --git a/common/ASC.Data.Backup.Core/BackupAjaxHandler.cs b/common/ASC.Data.Backup.Core/BackupAjaxHandler.cs index 43853aff4d..443684aa1b 100644 --- a/common/ASC.Data.Backup.Core/BackupAjaxHandler.cs +++ b/common/ASC.Data.Backup.Core/BackupAjaxHandler.cs @@ -365,7 +365,7 @@ public class BackupAjaxHandler var currentUser = _userManager.GetUsers(_securityContext.CurrentAccount.ID); if (!SetupInfo.IsVisibleSettings(nameof(ManagementType.Migration)) || !currentUser.IsOwner(_tenantManager.GetCurrentTenant()) - || !SetupInfo.IsSecretEmail(currentUser.Email) && !_tenantExtra.GetTenantQuota().HasMigration) + || !SetupInfo.IsSecretEmail(currentUser.Email) && !_tenantExtra.GetTenantQuota().AutoBackupRestore) { throw new InvalidOperationException(Resource.ErrorNotAllowedOption); } diff --git a/products/ASC.Files/Service/Thumbnail/FileDataProvider.cs b/products/ASC.Files/Service/Thumbnail/FileDataProvider.cs index c289e57a38..0b83d16be3 100644 --- a/products/ASC.Files/Service/Thumbnail/FileDataProvider.cs +++ b/products/ASC.Files/Service/Thumbnail/FileDataProvider.cs @@ -86,7 +86,7 @@ internal class FileDataProvider ) group by t.tenant */ - + //TODO using var filesDbContext = _coreContextFactory.CreateDbContext(); var search = filesDbContext.Tariffs