Birdseye fixes (#22166)
CI / AMD64 Build (push) Has been cancelled
CI / ARM Build (push) Has been cancelled
CI / ARM Extra Build (push) Has been cancelled
CI / Synaptics Build (push) Has been cancelled
CI / AMD64 Extra Build (push) Has been cancelled
CI / Assemble and push default build (push) Has been cancelled
CI / Jetson Jetpack 6 (push) Has been cancelled

* permit birdseye access if user has viewer role or a custom viewer role that has access to all cameras

* bump version
This commit is contained in:
Josh Hawkins
2026-02-27 20:02:46 -07:00
committed by GitHub
parent e064024a31
commit c687aa5119
4 changed files with 38 additions and 10 deletions
+8 -6
View File
@@ -11,12 +11,12 @@ import { useTranslation } from "react-i18next";
import { useEffect, useMemo, useRef } from "react";
import useSWR from "swr";
import { useAllowedCameras } from "@/hooks/use-allowed-cameras";
import { useIsAdmin } from "@/hooks/use-is-admin";
import { useHasFullCameraAccess } from "@/hooks/use-has-full-camera-access";
function Live() {
const { t } = useTranslation(["views/live"]);
const { data: config } = useSWR<FrigateConfig>("config");
const isAdmin = useIsAdmin();
const hasFullCameraAccess = useHasFullCameraAccess();
// selection
@@ -90,8 +90,8 @@ function Live() {
const allowedCameras = useAllowedCameras();
const includesBirdseye = useMemo(() => {
// Restricted users should never have access to birdseye
if (!isAdmin) {
// Users without access to all cameras should not have access to birdseye
if (!hasFullCameraAccess) {
return false;
}
@@ -106,7 +106,7 @@ function Live() {
} else {
return false;
}
}, [config, cameraGroup, isAdmin]);
}, [config, cameraGroup, hasFullCameraAccess]);
const cameras = useMemo(() => {
if (!config) {
@@ -151,7 +151,9 @@ function Live() {
return (
<div className="size-full" ref={mainRef}>
{selectedCameraName === "birdseye" ? (
{selectedCameraName === "birdseye" &&
hasFullCameraAccess &&
config?.birdseye?.enabled ? (
<LiveBirdseyeView
supportsFullscreen={supportsFullScreen}
fullscreen={fullscreen}