1
0
mirror of https://github.com/bitwarden/jslib synced 2025-12-06 00:03:29 +00:00

[EC-151] Hide Subscription/Billing information for Provider-managed organizations (#777)

* add canManageBilling permission and hasProvider helper method
This commit is contained in:
Thomas Rittson
2022-05-06 06:24:40 +10:00
committed by GitHub
parent 80c834b52a
commit 52321c51cc
2 changed files with 9 additions and 0 deletions

View File

@@ -24,4 +24,5 @@ export enum Permissions {
EditAssignedCollections,
DeleteAssignedCollections,
ManageSso,
ManageBilling,
}

View File

@@ -181,4 +181,12 @@ export class Organization {
get isExemptFromPolicies() {
return this.canManagePolicies;
}
get canManageBilling() {
return this.isOwner && (this.isProviderUser || !this.hasProvider);
}
get hasProvider() {
return this.providerId != null || this.providerName != null;
}
}