diff --git a/test_server/cms/views.py b/test_server/cms/views.py index ad8f043..503dd69 100644 --- a/test_server/cms/views.py +++ b/test_server/cms/views.py @@ -86,7 +86,7 @@ class SourceViewSet(ModelViewSet): class ThresholdViewSet(ModelViewSet): perms_map = [ - {'get': '*'}, {'post': 'threshold_update'}, + {'get': 'threshold_view'}, {'post': 'threshold_update'}, {'put': 'threshold_update'}, {'delete': 'threshold_update'}] queryset = Threshold.objects.filter(is_delete=0) serializer_class = ThresholdSerializer @@ -95,7 +95,7 @@ class ThresholdViewSet(ModelViewSet): search_fields = ['chinese_name','cas', 'compound_cate', 'odor_type'] filterset_fields = ['source', 'compound_cate'] - @action(methods=['post'], detail=False, perms_map=[{'post':'threshold'}], serializer_class=PathSerializer) + @action(methods=['post'], detail=False, perms_map=[{'post':'threshold_update'}], serializer_class=PathSerializer) @transaction.atomic def daoru(self, request, *args, **kwargs): '''导入excel