(cause: Cause.Cause<unknown>)
| 92 | * same denial: the distinction (no session vs wrong role) is the server's, and |
| 93 | * a signed-in member reading "unauthorized" would only confuse. */ |
| 94 | const isAccessDenied = (cause: Cause.Cause<unknown>): boolean => |
| 95 | Option.match(Cause.findErrorOption(cause), { |
| 96 | onNone: () => false, |
| 97 | onSome: (error) => |
| 98 | Predicate.isTagged(error, "AdminUsersForbidden") || |
| 99 | Predicate.isTagged(error, "AdminUsersUnauthorized"), |
| 100 | }); |
| 101 | |
| 102 | // ── Access denied ─────────────────────────────────────────────────────────── |
| 103 |
no outgoing calls
no test coverage detected