mirror of
https://github.com/bitwarden/server.git
synced 2025-07-02 00:22:50 -05:00
Add product type to organization details
This commit is contained in:
@ -42,6 +42,7 @@ namespace Bit.Core.Models.Api
|
|||||||
FamilySponsorshipAvailable = FamilySponsorshipFriendlyName == null &&
|
FamilySponsorshipAvailable = FamilySponsorshipFriendlyName == null &&
|
||||||
Utilities.StaticStore.GetSponsoredPlan(PlanSponsorshipType.FamiliesForEnterprise)
|
Utilities.StaticStore.GetSponsoredPlan(PlanSponsorshipType.FamiliesForEnterprise)
|
||||||
.UsersCanSponsor(organization);
|
.UsersCanSponsor(organization);
|
||||||
|
PlanProductType = Utilities.StaticStore.GetPlan(organization.PlanType).Product;
|
||||||
}
|
}
|
||||||
|
|
||||||
public string Id { get; set; }
|
public string Id { get; set; }
|
||||||
@ -74,5 +75,6 @@ namespace Bit.Core.Models.Api
|
|||||||
public string ProviderName { get; set; }
|
public string ProviderName { get; set; }
|
||||||
public string FamilySponsorshipFriendlyName { get; set; }
|
public string FamilySponsorshipFriendlyName { get; set; }
|
||||||
public bool FamilySponsorshipAvailable { get; set; }
|
public bool FamilySponsorshipAvailable { get; set; }
|
||||||
|
public ProductType PlanProductType { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -40,10 +40,10 @@ namespace Bit.Core.Services
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
var decryptedToken = _dataProtector.Unprotect(encryptedToken);
|
var decryptedToken = _dataProtector.Unprotect(encryptedToken[TokenClearTextPrefix.Length..]);
|
||||||
var dataParts = decryptedToken.Split(' ');
|
var dataParts = decryptedToken.Split(' ');
|
||||||
|
|
||||||
if (dataParts.Length != 2)
|
if (dataParts.Length != 3)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user