From 80069f3bdd7325159a2ee055b9c14182858fe6e2 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Wed, 16 Aug 2017 13:58:52 -0400 Subject: [PATCH] org props from license --- .../Services/Implementations/OrganizationService.cs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/Core/Services/Implementations/OrganizationService.cs b/src/Core/Services/Implementations/OrganizationService.cs index 8ccfb3b327..9e9ab78d25 100644 --- a/src/Core/Services/Implementations/OrganizationService.cs +++ b/src/Core/Services/Implementations/OrganizationService.cs @@ -557,12 +557,12 @@ namespace Bit.Core.Services var organization = new Organization { Name = license.Name, - BillingEmail = null, - BusinessName = null, + BillingEmail = license.BillingEmail, + BusinessName = license.BusinessName, PlanType = license.PlanType, Seats = license.Seats, MaxCollections = license.MaxCollections, - MaxStorageGb = 10240, // 10 TB + MaxStorageGb = _globalSettings.SelfHosted ? 10240 : license.MaxStorageGb, // 10 TB UseGroups = license.UseGroups, UseDirectory = license.UseDirectory, UseTotp = license.UseTotp, @@ -571,7 +571,7 @@ namespace Bit.Core.Services Gateway = null, GatewayCustomerId = null, GatewaySubscriptionId = null, - Enabled = true, + Enabled = license.Enabled, ExpirationDate = license.Expires, LicenseKey = license.LicenseKey, CreationDate = DateTime.UtcNow, @@ -677,6 +677,8 @@ namespace Bit.Core.Services File.WriteAllText($"{dir}/{organization.Id}.json", JsonConvert.SerializeObject(license, Formatting.Indented)); organization.Name = license.Name; + organization.BusinessName = license.BusinessName; + organization.BillingEmail = license.BillingEmail; organization.PlanType = license.PlanType; organization.Seats = license.Seats; organization.MaxCollections = license.MaxCollections; @@ -684,7 +686,7 @@ namespace Bit.Core.Services organization.UseDirectory = license.UseDirectory; organization.UseTotp = license.UseTotp; organization.Plan = license.Plan; - organization.Enabled = true; + organization.Enabled = license.Enabled; organization.ExpirationDate = license.Expires; organization.LicenseKey = license.LicenseKey; organization.RevisionDate = DateTime.UtcNow;