diff --git a/common/src/enums/permissions.ts b/common/src/enums/permissions.ts index 46a7445530..bb0021506a 100644 --- a/common/src/enums/permissions.ts +++ b/common/src/enums/permissions.ts @@ -24,4 +24,5 @@ export enum Permissions { EditAssignedCollections, DeleteAssignedCollections, ManageSso, + ManageBilling, } diff --git a/common/src/models/domain/organization.ts b/common/src/models/domain/organization.ts index 8a6822125d..fe38c3c854 100644 --- a/common/src/models/domain/organization.ts +++ b/common/src/models/domain/organization.ts @@ -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; + } }