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:
@@ -24,4 +24,5 @@ export enum Permissions {
|
||||
EditAssignedCollections,
|
||||
DeleteAssignedCollections,
|
||||
ManageSso,
|
||||
ManageBilling,
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user