MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / isAccessDenied

Function isAccessDenied

packages/react/src/pages/admin-users.tsx:94–100  ·  view source on GitHub ↗
(cause: Cause.Cause<unknown>)

Source from the content-addressed store, hash-verified

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. */
94const 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

Callers 2

UserDetailFunction · 0.85
AdminUsersPageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected