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

Function AdminPage

apps/host-selfhost/web/routes/app/admin.tsx:35–58  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

33// renders any member data or admin controls. The APIs remain the authority for
34// every admin mutation.
35function AdminPage() {
36 useExecutorDocumentTitle("Admin");
37 const members = useAtomValue(orgMembersAtom);
38 const access = AsyncResult.match(members, {
39 onInitial: (): AdminAccess => "loading",
40 onFailure: (): AdminAccess => "denied",
41 onSuccess: ({ value }): AdminAccess =>
42 isTenantAdminMember(value.members as readonly TenantMemberRow[]) ? "allowed" : "denied",
43 });
44
45 return (
46 <div className="min-h-0 flex-1 overflow-y-auto">
47 <div className="mx-auto flex max-w-3xl flex-col gap-10 px-6 py-10 lg:px-8 lg:py-14">
48 {access === "loading" ? (
49 <Notice>Checking admin access…</Notice>
50 ) : access === "allowed" ? (
51 <AdminConsole />
52 ) : (
53 <AdminAccessDenied />
54 )}
55 </div>
56 </div>
57 );
58}
59
60function AdminConsole() {
61 return (

Callers

nothing calls this directly

Calls 2

useExecutorDocumentTitleFunction · 0.90
isTenantAdminMemberFunction · 0.90

Tested by

no test coverage detected