From 9105ecf363fc59fb951ba9d74d2b30af544f067a Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Fri, 17 Jul 2026 06:22:45 -0500 Subject: [PATCH] fix notification test button being blocked by websocket auth --- frigate/comms/ws.py | 2 -- frigate/test/test_ws_auth.py | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/frigate/comms/ws.py b/frigate/comms/ws.py index ac047b053f..ccb5d42890 100644 --- a/frigate/comms/ws.py +++ b/frigate/comms/ws.py @@ -23,7 +23,6 @@ from frigate.const import ( EXPIRE_AUDIO_ACTIVITY, INSERT_MANY_RECORDINGS, INSERT_PREVIEW, - NOTIFICATION_TEST, REQUEST_REGION_GRID, UPDATE_AUDIO_ACTIVITY, UPDATE_AUDIO_TRANSCRIPTION_STATE, @@ -57,7 +56,6 @@ _WS_BLOCKED_TOPICS = frozenset( UPDATE_EMBEDDINGS_REINDEX_PROGRESS, UPDATE_BIRDSEYE_LAYOUT, UPDATE_AUDIO_TRANSCRIPTION_STATE, - NOTIFICATION_TEST, } ) diff --git a/frigate/test/test_ws_auth.py b/frigate/test/test_ws_auth.py index a9fc6e1320..4fc6701136 100644 --- a/frigate/test/test_ws_auth.py +++ b/frigate/test/test_ws_auth.py @@ -115,6 +115,13 @@ class TestCheckWsAuthorization(unittest.TestCase): ) ) + def test_viewer_blocked_from_notification_test(self): + self.assertFalse( + _check_ws_authorization( + "notification_test", "viewer", self.DEFAULT_SEPARATOR + ) + ) + # --- Admin access --- def test_admin_can_send_restart(self): @@ -134,6 +141,13 @@ class TestCheckWsAuthorization(unittest.TestCase): _check_ws_authorization("front_door/ptz", "admin", self.DEFAULT_SEPARATOR) ) + def test_admin_can_send_notification_test(self): + self.assertTrue( + _check_ws_authorization( + "notification_test", "admin", self.DEFAULT_SEPARATOR + ) + ) + # --- Comma-separated roles --- def test_comma_separated_admin_viewer_grants_admin(self):