( userId: User.UserId, organizationId: Organisation.OrganisationId, )
| 118 | } |
| 119 | |
| 120 | export async function requireOrganizationOwner( |
| 121 | userId: User.UserId, |
| 122 | organizationId: Organisation.OrganisationId, |
| 123 | ) { |
| 124 | const access = await requireOrganizationAccess(userId, organizationId); |
| 125 | if (!canManageOrganizationBilling(access.role)) { |
| 126 | throw new Error("Only the owner can manage this organization setting"); |
| 127 | } |
| 128 | return access; |
| 129 | } |
nothing calls this directly
no test coverage detected