Quota: removed hasMigrationFeature

This commit is contained in:
pavelbannov 2022-09-07 19:35:07 +03:00
parent e2dc47adea
commit 375853bf8e
3 changed files with 2 additions and 11 deletions

View File

@ -140,13 +140,6 @@ public class TenantQuota : IMapFrom<DbQuota>
set => _docsEditionFeature.Value = value; set => _docsEditionFeature.Value = value;
} }
private readonly TenantQuotaFeatureFlag _hasMigrationFeature;
public bool HasMigration
{
get => _hasMigrationFeature.Value;
set => _hasMigrationFeature.Value = value;
}
private readonly TenantQuotaFeatureFlag _ldapFeature; private readonly TenantQuotaFeatureFlag _ldapFeature;
public bool Ldap public bool Ldap
{ {
@ -224,7 +217,6 @@ public class TenantQuota : IMapFrom<DbQuota>
_updateFeature = new TenantQuotaFeatureFlag(this) { Name = "update", Visible = false }; _updateFeature = new TenantQuotaFeatureFlag(this) { Name = "update", Visible = false };
_auditFeature = new TenantQuotaFeatureFlag(this) { Name = "audit", Order = 7 }; _auditFeature = new TenantQuotaFeatureFlag(this) { Name = "audit", Order = 7 };
_docsEditionFeature = new TenantQuotaFeatureFlag(this) { Name = "docs", Visible = false }; _docsEditionFeature = new TenantQuotaFeatureFlag(this) { Name = "docs", Visible = false };
_hasMigrationFeature = new TenantQuotaFeatureFlag(this) { Name = "migration", Visible = false };
_ldapFeature = new TenantQuotaFeatureFlag(this) { Name = "ldap", Visible = false }; _ldapFeature = new TenantQuotaFeatureFlag(this) { Name = "ldap", Visible = false };
_ssoFeature = new TenantQuotaFeatureFlag(this) { Name = "sso", Order = 5 }; _ssoFeature = new TenantQuotaFeatureFlag(this) { Name = "sso", Order = 5 };
_whiteLabelFeature = new TenantQuotaFeatureFlag(this) { Name = "whitelabel", Order = 4 }; _whiteLabelFeature = new TenantQuotaFeatureFlag(this) { Name = "whitelabel", Order = 4 };
@ -247,7 +239,6 @@ public class TenantQuota : IMapFrom<DbQuota>
_updateFeature, _updateFeature,
_auditFeature, _auditFeature,
_docsEditionFeature, _docsEditionFeature,
_hasMigrationFeature,
_ldapFeature, _ldapFeature,
_ssoFeature, _ssoFeature,
_whiteLabelFeature, _whiteLabelFeature,

View File

@ -365,7 +365,7 @@ public class BackupAjaxHandler
var currentUser = _userManager.GetUsers(_securityContext.CurrentAccount.ID); var currentUser = _userManager.GetUsers(_securityContext.CurrentAccount.ID);
if (!SetupInfo.IsVisibleSettings(nameof(ManagementType.Migration)) if (!SetupInfo.IsVisibleSettings(nameof(ManagementType.Migration))
|| !currentUser.IsOwner(_tenantManager.GetCurrentTenant()) || !currentUser.IsOwner(_tenantManager.GetCurrentTenant())
|| !SetupInfo.IsSecretEmail(currentUser.Email) && !_tenantExtra.GetTenantQuota().HasMigration) || !SetupInfo.IsSecretEmail(currentUser.Email) && !_tenantExtra.GetTenantQuota().AutoBackupRestore)
{ {
throw new InvalidOperationException(Resource.ErrorNotAllowedOption); throw new InvalidOperationException(Resource.ErrorNotAllowedOption);
} }

View File

@ -86,7 +86,7 @@ internal class FileDataProvider
) )
group by t.tenant group by t.tenant
*/ */
//TODO
using var filesDbContext = _coreContextFactory.CreateDbContext(); using var filesDbContext = _coreContextFactory.CreateDbContext();
var search = var search =
filesDbContext.Tariffs filesDbContext.Tariffs