Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

chore(navigation): use the denied stamp hoggie on every access denied screen (#100607)

posthog[bot]ce9cbc632001
diff --git a/frontend/public/no-access-nopehog.png b/frontend/public/no-access-nopehog.png
deleted file mode 100644
index e44b9f39c11d..000000000000
Binary files a/frontend/public/no-access-nopehog.png and /dev/null differ
diff --git a/frontend/src/layout/ErrorProjectAccessDenied.tsx b/frontend/src/layout/ErrorProjectAccessDenied.tsx
index 23004f184e3f..c06fa06322dd 100644
--- a/frontend/src/layout/ErrorProjectAccessDenied.tsx
+++ b/frontend/src/layout/ErrorProjectAccessDenied.tsx
@@ -1,22 +1,12 @@
-import * as stampDenied from '@posthog/brand/hoggies/png/stamp-denied'
-
-import { pngHoggie } from 'lib/brand/hoggies'
import { AccessDenied } from 'lib/components/AccessDenied'
import { NotFound } from 'lib/components/NotFound'
import { getAppContext } from 'lib/utils/getAppContext'
-const HedgehogStampDenied = pngHoggie(stampDenied)
-
export function ErrorProjectAccessDenied(): JSX.Element {
// Staff keep the impersonation shortcut, which NotFound renders from the same app context.
if (getAppContext()?.suggested_users_with_access) {
return <NotFound object="project" />
}
- return (
- <AccessDenied
- reason="This link points to a project you're not a member of."
- illustration={HedgehogStampDenied}
- />
- )
+ return <AccessDenied reason="This link points to a project you're not a member of." />
}
diff --git a/frontend/src/lib/components/AccessDenied/index.tsx b/frontend/src/lib/components/AccessDenied/index.tsx
index ab469792d801..ffd2e3a1b5ca 100644
--- a/frontend/src/lib/components/AccessDenied/index.tsx
+++ b/frontend/src/lib/components/AccessDenied/index.tsx
@@ -1,42 +1,34 @@
import { useActions } from 'kea'
-import { ComponentType, ReactNode } from 'react'
+import { ReactNode } from 'react'
-import type { AssetSvgProps } from '@posthog/brand'
+import * as stampDenied from '@posthog/brand/hoggies/png/stamp-denied'
+import { pngHoggie } from 'lib/brand/hoggies'
import { Link } from 'lib/lemon-ui/Link'
import { cn } from 'lib/utils/css-classes'
-import noAccessNopehog from 'public/no-access-nopehog.png'
-
import { supportLogic } from '../Support/supportLogic'
+const HedgehogStampDenied = pngHoggie(stampDenied)
+
export interface AccessDeniedProps {
/** Name of the object the user can't access (e.g. "feature flag"). Produces: "You do not have access to this {object}...". */
object?: string
/** Custom explanation of *why* access is denied. Rendered in place of the default first sentence; the support-link tail stays. */
reason?: ReactNode
inline?: boolean
- /** Hoggie to show above the heading, in place of the default one. */
- illustration?: ComponentType<AssetSvgProps>
}
-export function AccessDenied({ object, reason, inline = false, illustration }: AccessDeniedProps): JSX.Element {
+export function AccessDenied({ object, reason, inline = false }: AccessDeniedProps): JSX.Element {
const { openSupportForm } = useActions(supportLogic)
const handleClickSupport = (): void => {
openSupportForm({ kind: 'support' })
}
- const Illustration = illustration
- const illustrationClassName = cn('bg-no-repeat bg-center', inline ? 'w-32 h-32' : 'w-64 h-64')
-
return (
<div className={cn('flex flex-col items-center max-w-2xl p-4 mx-auto text-center', !inline && 'my-24')}>
- {Illustration ? (
- <Illustration className={illustrationClassName} />
- ) : (
- <img src={noAccessNopehog} alt="Access denied illustration" className={illustrationClassName} />
- )}
+ <HedgehogStampDenied className={inline ? 'w-32 h-32' : 'w-64 h-64'} />
<h1 className="text-3xl font-bold mt-4 mb-0">Access denied</h1>
{reason ? (
<>