ensure only public overviews are accecible publicly

This commit is contained in:
Carl-Gerhard Lindesvärd
2024-03-13 11:50:23 +01:00
parent cfa1d9ab46
commit b98f643221

View File

@@ -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);