ApiSystem: fix
This commit is contained in:
parent
dc2cfbc614
commit
0a1ab5c77d
@ -21,6 +21,7 @@
|
||||
"common\\ASC.Notify.Textile\\ASC.Notify.Textile.csproj",
|
||||
"common\\ASC.Textile\\ASC.Textile.csproj",
|
||||
"common\\ASC.Webhooks.Core\\ASC.Webhooks.Core.csproj",
|
||||
"common\\services\\ASC.ApiSystem\\ASC.ApiSystem.csproj",
|
||||
"common\\services\\ASC.AuditTrail\\ASC.AuditTrail.csproj",
|
||||
"common\\services\\ASC.ClearEvents\\ASC.ClearEvents.csproj",
|
||||
"common\\services\\ASC.Data.Backup.BackgroundTasks\\ASC.Data.Backup.BackgroundTasks.csproj",
|
||||
|
@ -139,7 +139,6 @@ public class CommonMethods
|
||||
language = t.Language,
|
||||
name = t.Name == "" ? Resource.PortalName : t.Name,
|
||||
ownerId = t.OwnerId,
|
||||
partnerId = t.PartnerId,
|
||||
paymentId = t.PaymentId,
|
||||
portalName = t.Alias,
|
||||
status = t.Status.ToString(),
|
||||
|
@ -222,15 +222,6 @@ public class PortalController : ControllerBase
|
||||
LimitedControlPanel = model.LimitedControlPanel
|
||||
};
|
||||
|
||||
if (!string.IsNullOrEmpty(model.PartnerId))
|
||||
{
|
||||
if (Guid.TryParse(model.PartnerId, out _))
|
||||
{
|
||||
// valid guid
|
||||
info.PartnerId = model.PartnerId;
|
||||
}
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(model.AffiliateId))
|
||||
{
|
||||
info.AffiliateId = model.AffiliateId;
|
||||
@ -286,7 +277,7 @@ public class PortalController : ControllerBase
|
||||
|
||||
var tariff = new Tariff
|
||||
{
|
||||
QuotaId = trialQuotaId,
|
||||
Quotas = new List<Quota> { new Quota(trialQuotaId, 1) },
|
||||
DueDate = dueDate
|
||||
};
|
||||
HostedSolution.SetTariff(t.Id, tariff);
|
||||
|
@ -114,7 +114,7 @@ public class TariffController : ControllerBase
|
||||
|
||||
var quota = new TenantQuota(tenant.Id)
|
||||
{
|
||||
ActiveUsers = 10000,
|
||||
CountManager = 10000,
|
||||
Features = model.Features ?? "",
|
||||
MaxFileSize = 1024 * 1024 * 1024,
|
||||
MaxTotalSize = 1024L * 1024 * 1024 * 1024 - 1,
|
||||
@ -123,7 +123,7 @@ public class TariffController : ControllerBase
|
||||
|
||||
if (model.ActiveUsers != default)
|
||||
{
|
||||
quota.ActiveUsers = model.ActiveUsers;
|
||||
quota.CountManager = model.ActiveUsers;
|
||||
}
|
||||
|
||||
if (model.MaxTotalSize != default)
|
||||
@ -139,8 +139,8 @@ public class TariffController : ControllerBase
|
||||
HostedSolution.SaveTenantQuota(quota);
|
||||
|
||||
var tariff = new Tariff
|
||||
{
|
||||
QuotaId = quota.Tenant,
|
||||
{
|
||||
Quotas = new List<Quota> { new Quota(quota.Tenant, 1) },
|
||||
DueDate = model.DueDate != default ? model.DueDate : DateTime.MaxValue.AddSeconds(-1),
|
||||
};
|
||||
|
||||
@ -184,8 +184,8 @@ public class TariffController : ControllerBase
|
||||
public IActionResult GetTariffs()
|
||||
{
|
||||
var tariffs = HostedSolution.GetTenantQuotas()
|
||||
.Where(q => !q.Trial && !q.Free && !q.Open)
|
||||
.OrderBy(q => q.ActiveUsers)
|
||||
.Where(q => !q.Trial && !q.Free)
|
||||
.OrderBy(q => q.CountManager)
|
||||
.ThenByDescending(q => q.Tenant)
|
||||
.Select(q => ToTariffWrapper(null, q));
|
||||
|
||||
@ -216,7 +216,7 @@ public class TariffController : ControllerBase
|
||||
{
|
||||
return new
|
||||
{
|
||||
activeUsers = q.ActiveUsers,
|
||||
countManager = q.CountManager,
|
||||
dueDate = t == null ? DateTime.MaxValue : t.DueDate,
|
||||
features = q.Features,
|
||||
maxFileSize = q.MaxFileSize,
|
||||
|
@ -58,10 +58,7 @@ public class TenantModel : IModel
|
||||
[StringLength(Web.Core.Utility.PasswordSettings.MaxLength)]
|
||||
public string Password { get; set; }
|
||||
|
||||
public string PasswordHash { get; set; }
|
||||
|
||||
[StringLength(255)]
|
||||
public string PartnerId { get; set; }
|
||||
public string PasswordHash { get; set; }
|
||||
|
||||
[StringLength(32)]
|
||||
public string Phone { get; set; }
|
||||
|
Loading…
Reference in New Issue
Block a user