API admin exemptions and route guard updates (#21094)

* update exempt paths and add missing guard to api endpoints

* admin only frigate+ submission
This commit is contained in:
Josh Hawkins
2025-11-29 07:30:04 -06:00
committed by GitHub
parent 1b57fb15a7
commit 048475e750
11 changed files with 64 additions and 12 deletions
@@ -20,6 +20,7 @@ import ImageLoadingIndicator from "@/components/indicators/ImageLoadingIndicator
import { baseUrl } from "@/api/baseUrl";
import { getTranslatedLabel } from "@/utils/i18n";
import useImageLoaded from "@/hooks/use-image-loaded";
import { useIsAdmin } from "@/hooks/use-is-admin";
export type FrigatePlusDialogProps = {
upload?: Event;
@@ -57,7 +58,9 @@ export function FrigatePlusDialog({
);
const [imgRef, imgLoaded, onImgLoad] = useImageLoaded();
const isAdmin = useIsAdmin();
const showCard =
isAdmin &&
!!upload &&
upload.data.type === "object" &&
upload.plus_id !== "not_enabled" &&