(headers: Headers)
| 39 | // plane's error vocabulary (the HttpApi group declares these, not the users |
| 40 | // plane's). |
| 41 | const requireAdmin = (headers: Headers) => |
| 42 | requireInstanceAdmin(headers).pipe( |
| 43 | Effect.mapError((denial) => |
| 44 | denial === "unauthorized" ? new AdminUnauthorized() : new AdminForbidden(), |
| 45 | ), |
| 46 | ); |
| 47 | |
| 48 | const narrowRole = (role: string | undefined): InviteRole => |
| 49 | role === "admin" ? "admin" : "member"; |
no test coverage detected