mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-03-21 07:38:22 +03:00
revert
This commit is contained in:
parent
8e35a6cd92
commit
07fd57209c
@ -1002,7 +1002,8 @@ async def require_camera_access(
|
|||||||
roles_dict = request.app.frigate_config.auth.roles
|
roles_dict = request.app.frigate_config.auth.roles
|
||||||
allowed_cameras = User.get_allowed_cameras(role, roles_dict, all_camera_names)
|
allowed_cameras = User.get_allowed_cameras(role, roles_dict, all_camera_names)
|
||||||
|
|
||||||
if role == "admin":
|
# Admin or full access bypasses
|
||||||
|
if role == "admin" or not roles_dict.get(role):
|
||||||
return
|
return
|
||||||
|
|
||||||
if camera_name not in allowed_cameras:
|
if camera_name not in allowed_cameras:
|
||||||
@ -1052,7 +1053,8 @@ async def require_go2rtc_stream_access(
|
|||||||
roles_dict = request.app.frigate_config.auth.roles
|
roles_dict = request.app.frigate_config.auth.roles
|
||||||
allowed_cameras = User.get_allowed_cameras(role, roles_dict, all_camera_names)
|
allowed_cameras = User.get_allowed_cameras(role, roles_dict, all_camera_names)
|
||||||
|
|
||||||
if role == "admin":
|
# Admin or full access bypasses
|
||||||
|
if role == "admin" or not roles_dict.get(role):
|
||||||
return
|
return
|
||||||
|
|
||||||
owner_cameras = _get_stream_owner_cameras(request, stream_name)
|
owner_cameras = _get_stream_owner_cameras(request, stream_name)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user