feat: 增加threshold_view权限标识
This commit is contained in:
parent
14340fe0c6
commit
30ce014de6
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue