import { FC, ReactNode } from "react"; import Link from "next/link"; import Image from "next/image"; import { observer } from "mobx-react-lite"; // icons import { LayoutGrid } from "lucide-react"; // ui import { Button } from "@plane/ui"; // hooks import { useMobxStore } from "lib/mobx/store-provider"; // images import AccessDeniedImg from "public/auth/access-denied.svg"; export interface IAdminAuthWrapper { children: ReactNode; } export const AdminAuthWrapper: FC = observer(({ children }) => { // store const { user: { isUserInstanceAdmin }, workspace: { workspaceSlug }, user: { currentUserSettings }, } = useMobxStore(); // redirect url const redirectWorkspaceSlug = workspaceSlug || currentUserSettings?.workspace?.last_workspace_slug || currentUserSettings?.workspace?.fallback_workspace_slug || ""; // if user does not have admin access to the instance if (isUserInstanceAdmin !== undefined && isUserInstanceAdmin === false) { return (
AccessDeniedImg

God mode needs a god role

Doesn’t look like you have that role.

Do we have a god role?

Yes.

Do we call it god role?

No. Obviously not.

Can you get it?

Maybe. Ask your god.

Are we being intentionally cryptic?

Yes.

Is this for the security of your workspaces?

Absolutely!

Are you the god here and still seeing this?

Sorry, God.{" "} Talk to us.

); } return <>{children}; });