Fix review summary report analysis creation to be scoped for users with full camera access only (#24056)

* Fix review summary analysis

* Add ability to scope based on full camera access
This commit is contained in:
Nicolas Mowen
2026-08-22 11:06:01 -05:00
committed by GitHub
parent b1cdf1f76b
commit fc79aeab5e
5 changed files with 101 additions and 6 deletions
+5 -1
View File
@@ -17,6 +17,7 @@ from frigate.api.auth import (
get_allowed_cameras_for_filter,
get_current_user,
require_camera_access,
require_full_camera_access,
require_role,
)
from frigate.api.defs.query.review_query_parameters import (
@@ -743,9 +744,12 @@ async def set_not_reviewed(
)
# Intentionally not camera scoped, as the summary correlates each flagged event
# with overlapping activity on other cameras. Restricted to callers who can
# already see every camera, so the unscoped query discloses nothing.
@router.post(
"/review/summarize/start/{start_ts}/end/{end_ts}",
dependencies=[Depends(require_role(["admin"]))],
dependencies=[Depends(require_full_camera_access)],
description="Use GenAI to summarize review items over a period of time.",
)
def generate_review_summary(request: Request, start_ts: float, end_ts: float):