fix: perms_map 修改

This commit is contained in:
caoqianming 2023-06-26 17:17:37 +08:00
parent 13b0204c6b
commit 06c896c97f
2 changed files with 3 additions and 1 deletions

View File

@ -24,6 +24,7 @@ class MpLogViewSet(ListModelMixin, CustomGenericViewSet):
测点原始记录
"""
perms_map = {'get': '*'}
queryset = MpLog.objects.all()
serializer_class = MpLogSerializer
select_related_fields = ['mpoint']
@ -36,6 +37,7 @@ class MpointStatViewSet(ListModelMixin, CustomGenericViewSet):
测点统计记录
"""
perms_map = {'get': '*'}
queryset = MpointStat.objects.all()
serializer_class = MpointStatSerializer
select_related_fields = ['mpoint']

View File

@ -24,7 +24,7 @@ class CustomGenericViewSet(MyLoggingMixin, GenericViewSet):
"""
增强的GenericViewSet
"""
perms_map = {'get': '*'} # 权限标识
perms_map = {} # 权限标识
throttle_classes = [UserRateThrottle]
logging_methods = ['POST', 'PUT', 'PATCH', 'DELETE']
ordering_fields = '__all__'