mirror of
https://github.com/Dispatcharr/Dispatcharr.git
synced 2026-07-18 00:55:50 +00:00
fix(epg): update permission handling for sd_lineups actions in EPGSourceViewSet
This commit is contained in:
parent
ca6ab0cd02
commit
7d2f0cdab3
1 changed files with 5 additions and 0 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue