From 7d2f0cdab3b735c5dcf90c215d5edf1a08dec911 Mon Sep 17 00:00:00 2001 From: SergeantPanda Date: Sun, 31 May 2026 10:03:03 -0500 Subject: [PATCH] fix(epg): update permission handling for sd_lineups actions in EPGSourceViewSet --- apps/epg/api_views.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apps/epg/api_views.py b/apps/epg/api_views.py index 2cfa8f47..f368714f 100644 --- a/apps/epg/api_views.py +++ b/apps/epg/api_views.py @@ -22,6 +22,7 @@ from .tasks import refresh_epg_data from .query_utils import parse_text_query from apps.accounts.permissions import ( Authenticated, + IsAdmin, IsStandardUser, permission_classes_by_action, permission_classes_by_method, @@ -47,6 +48,10 @@ class EPGSourceViewSet(viewsets.ModelViewSet): try: return [perm() for perm in permission_classes_by_action[self.action]] except KeyError: + if self.action in ('sd_lineups', 'sd_lineups_search'): + if self.request.method == 'GET': + return [IsStandardUser()] + return [IsAdmin()] return [Authenticated()] def get_queryset(self):