vsc远程文件权限修改
This commit is contained in:
parent
0f411279de
commit
d1c79e516a
|
@ -47,7 +47,7 @@ class EmployeeViewSet(CustomModelViewSet):
|
|||
search_fields = ['name', 'number', 'user__username']
|
||||
ordering = ['-pk']
|
||||
|
||||
@action(methods=['post'], detail=True, perms_map={'post': 'employee.notworkremark'}
|
||||
@action(methods=['post'], detail=True, perms_map={'post': 'employee:notworkremark'}
|
||||
, serializer_class=EmployeeNotWorkRemarkSerializer)
|
||||
def not_work_remark(self, request, pk=None):
|
||||
"""
|
||||
|
@ -79,7 +79,7 @@ class EmployeeViewSet(CustomModelViewSet):
|
|||
raise ParseError(**NO_NEED_LEVEL_REMARK)
|
||||
|
||||
@transaction.atomic
|
||||
@action(methods=['post'], detail=False, perms_map={'post': 'employee.channel_authority'}
|
||||
@action(methods=['post'], detail=False, perms_map={'post': 'employee:channel_authority'}
|
||||
, serializer_class=ChannelAuthoritySerializer)
|
||||
def channel_authority(self, request, pk=None):
|
||||
"""门通道授权
|
||||
|
@ -114,7 +114,7 @@ class EmployeeViewSet(CustomModelViewSet):
|
|||
return Response()
|
||||
|
||||
@transaction.atomic
|
||||
@action(methods=['post'], detail=False, perms_map={'post': 'employee.face_bind_1'}
|
||||
@action(methods=['post'], detail=False, perms_map={'post': 'employee:face_bind_1'}
|
||||
, serializer_class=serializers.Serializer)
|
||||
def face_bind_1(self, request, pk=None):
|
||||
"""同步人脸库1
|
||||
|
@ -153,7 +153,7 @@ class EmployeeViewSet(CustomModelViewSet):
|
|||
dhClient.request(**dhapis['face_bind'], json=json_data)
|
||||
return Response()
|
||||
|
||||
@action(methods=['get'], detail=False, perms_map={'get': 'employee.face_bind_1'}
|
||||
@action(methods=['get'], detail=False, perms_map={'get': 'employee:face_bind_1'}
|
||||
, serializer_class=serializers.Serializer)
|
||||
def face_status_1(self, request, pk=None):
|
||||
"""人像下发状态
|
||||
|
|
|
@ -69,7 +69,7 @@ class PTaskViewSet(CustomModelViewSet):
|
|||
select_related_fields = ['interval', 'crontab']
|
||||
ordering = ['-create_time']
|
||||
|
||||
@action(methods=['put'], detail=True, perms_map={'put': 'ptask.update'})
|
||||
@action(methods=['put'], detail=True, perms_map={'put': 'ptask:update'})
|
||||
def toggle(self, request, pk=None):
|
||||
"""修改启用禁用状态
|
||||
|
||||
|
@ -263,7 +263,7 @@ class UserPostViewSet(CreateModelMixin, DestroyModelMixin, ListModelMixin, Custo
|
|||
|
||||
用户/岗位关系
|
||||
"""
|
||||
perms_map = {'get': '*', 'post': 'user.update', 'delete': 'user.update'}
|
||||
perms_map = {'get': '*', 'post': 'user:update', 'delete': 'user:update'}
|
||||
queryset = UserPost.objects.select_related('user', 'post', 'dept').all()
|
||||
serializer_class = UserPostSerializer
|
||||
create_serializer_class = UserPostCreateSerializer
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue