1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-12 14:23:32 +00:00

[PM-13783] Battle harden ProviderType enum expansion (#11920)

This commit is contained in:
Jonas Hendrickx
2024-11-14 17:46:02 +01:00
committed by GitHub
parent d0f24dc41f
commit a4156799e9

View File

@@ -283,9 +283,7 @@ export class Organization {
return true; return true;
} }
return this.hasProvider && this.providerType === ProviderType.Msp return this.hasBillableProvider ? this.isProviderUser : this.isOwner;
? this.isProviderUser
: this.isOwner;
} }
get canEditSubscription() { get canEditSubscription() {
@@ -304,6 +302,14 @@ export class Organization {
return this.providerId != null || this.providerName != null; return this.providerId != null || this.providerName != null;
} }
get hasBillableProvider() {
return (
this.hasProvider &&
(this.providerType === ProviderType.Msp ||
this.providerType === ProviderType.MultiOrganizationEnterprise)
);
}
get hasReseller() { get hasReseller() {
return this.hasProvider && this.providerType === ProviderType.Reseller; return this.hasProvider && this.providerType === ProviderType.Reseller;
} }