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