Skip to content

OpenPanel is an open-source web and product analytics platform, an open-source alternative to Mixpanel with optional self-hosting.

ensure only public overviews are accecible publicly

Carl-Gerhard Lindesvärdb98f643221b9
diff --git a/apps/dashboard/src/app/(public)/share/overview/[id]/page.tsx b/apps/dashboard/src/app/(public)/share/overview/[id]/page.tsx
index 5c19d9cf8..809bf5936 100644
--- a/apps/dashboard/src/app/(public)/share/overview/[id]/page.tsx
+++ b/apps/dashboard/src/app/(public)/share/overview/[id]/page.tsx
@@ -2,7 +2,6 @@ import { StickyBelowHeader } from '@/app/(app)/[organizationId]/[projectId]/layo
import { OverviewReportRange } from '@/app/(app)/[organizationId]/[projectId]/overview-sticky-header';
import { Logo } from '@/components/Logo';
import { OverviewFiltersButtons } from '@/components/overview/filters/overview-filters-buttons';
-import { OverviewFiltersDrawer } from '@/components/overview/filters/overview-filters-drawer';
import ServerLiveCounter from '@/components/overview/live-counter';
import { OverviewLiveHistogram } from '@/components/overview/overview-live-histogram';
import OverviewMetrics from '@/components/overview/overview-metrics';
@@ -26,6 +25,9 @@ export default async function Page({ params: { id } }: PageProps) {
if (!share) {
return notFound();
}
+ if (!share.public) {
+ return notFound();
+ }
const projectId = share.project_id;
const organization = await getOrganizationBySlug(share.organization_slug);