( userId: User.UserId, organizationId: Organisation.OrganisationId, )
| 68 | } |
| 69 | |
| 70 | export async function requireOrganizationAccess( |
| 71 | userId: User.UserId, |
| 72 | organizationId: Organisation.OrganisationId, |
| 73 | ) { |
| 74 | const access = await getOrganizationAccess(userId, organizationId); |
| 75 | if (!access) throw new Error("Forbidden"); |
| 76 | return access; |
| 77 | } |
| 78 | |
| 79 | export async function requireOrganizationSettingsAccess( |
| 80 | userId: User.UserId, |
no test coverage detected