mirror of
https://github.com/bitwarden/server.git
synced 2025-04-16 02:28:13 -05:00
org props from license
This commit is contained in:
parent
912e875a33
commit
80069f3bdd
@ -557,12 +557,12 @@ namespace Bit.Core.Services
|
|||||||
var organization = new Organization
|
var organization = new Organization
|
||||||
{
|
{
|
||||||
Name = license.Name,
|
Name = license.Name,
|
||||||
BillingEmail = null,
|
BillingEmail = license.BillingEmail,
|
||||||
BusinessName = null,
|
BusinessName = license.BusinessName,
|
||||||
PlanType = license.PlanType,
|
PlanType = license.PlanType,
|
||||||
Seats = license.Seats,
|
Seats = license.Seats,
|
||||||
MaxCollections = license.MaxCollections,
|
MaxCollections = license.MaxCollections,
|
||||||
MaxStorageGb = 10240, // 10 TB
|
MaxStorageGb = _globalSettings.SelfHosted ? 10240 : license.MaxStorageGb, // 10 TB
|
||||||
UseGroups = license.UseGroups,
|
UseGroups = license.UseGroups,
|
||||||
UseDirectory = license.UseDirectory,
|
UseDirectory = license.UseDirectory,
|
||||||
UseTotp = license.UseTotp,
|
UseTotp = license.UseTotp,
|
||||||
@ -571,7 +571,7 @@ namespace Bit.Core.Services
|
|||||||
Gateway = null,
|
Gateway = null,
|
||||||
GatewayCustomerId = null,
|
GatewayCustomerId = null,
|
||||||
GatewaySubscriptionId = null,
|
GatewaySubscriptionId = null,
|
||||||
Enabled = true,
|
Enabled = license.Enabled,
|
||||||
ExpirationDate = license.Expires,
|
ExpirationDate = license.Expires,
|
||||||
LicenseKey = license.LicenseKey,
|
LicenseKey = license.LicenseKey,
|
||||||
CreationDate = DateTime.UtcNow,
|
CreationDate = DateTime.UtcNow,
|
||||||
@ -677,6 +677,8 @@ namespace Bit.Core.Services
|
|||||||
File.WriteAllText($"{dir}/{organization.Id}.json", JsonConvert.SerializeObject(license, Formatting.Indented));
|
File.WriteAllText($"{dir}/{organization.Id}.json", JsonConvert.SerializeObject(license, Formatting.Indented));
|
||||||
|
|
||||||
organization.Name = license.Name;
|
organization.Name = license.Name;
|
||||||
|
organization.BusinessName = license.BusinessName;
|
||||||
|
organization.BillingEmail = license.BillingEmail;
|
||||||
organization.PlanType = license.PlanType;
|
organization.PlanType = license.PlanType;
|
||||||
organization.Seats = license.Seats;
|
organization.Seats = license.Seats;
|
||||||
organization.MaxCollections = license.MaxCollections;
|
organization.MaxCollections = license.MaxCollections;
|
||||||
@ -684,7 +686,7 @@ namespace Bit.Core.Services
|
|||||||
organization.UseDirectory = license.UseDirectory;
|
organization.UseDirectory = license.UseDirectory;
|
||||||
organization.UseTotp = license.UseTotp;
|
organization.UseTotp = license.UseTotp;
|
||||||
organization.Plan = license.Plan;
|
organization.Plan = license.Plan;
|
||||||
organization.Enabled = true;
|
organization.Enabled = license.Enabled;
|
||||||
organization.ExpirationDate = license.Expires;
|
organization.ExpirationDate = license.Expires;
|
||||||
organization.LicenseKey = license.LicenseKey;
|
organization.LicenseKey = license.LicenseKey;
|
||||||
organization.RevisionDate = DateTime.UtcNow;
|
organization.RevisionDate = DateTime.UtcNow;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user