MCPcopy
hub / github.com/CapSoftware/Cap / requireOrganizationOwner

Function requireOrganizationOwner

apps/web/actions/organization/authorization.ts:120–129  ·  view source on GitHub ↗
(
	userId: User.UserId,
	organizationId: Organisation.OrganisationId,
)

Source from the content-addressed store, hash-verified

118}
119
120export 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}

Callers

nothing calls this directly

Calls 2

Tested by

no test coverage detected