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

Function isAccessDenied

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

Source from the content-addressed store, hash-verified

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

Callers 2

UserDetailFunction · 0.85
AdminUsersPageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected