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;
}
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<DbQuota>
_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<DbQuota>
_updateFeature,
_auditFeature,
_docsEditionFeature,
_hasMigrationFeature,
_ldapFeature,
_ssoFeature,
_whiteLabelFeature,

View File

@ -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);
}

View File

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