fix: clock record view加入权限控制
This commit is contained in:
parent
0766cba363
commit
ebcef8721f
|
@ -6,7 +6,7 @@ from rest_framework import serializers
|
|||
from rest_framework.decorators import action
|
||||
from rest_framework.exceptions import ParseError
|
||||
from rest_framework.mixins import ListModelMixin
|
||||
from rest_framework.permissions import AllowAny
|
||||
from rest_framework.permissions import AllowAny, IsAuthenticated
|
||||
from rest_framework.response import Response
|
||||
|
||||
from apps.hrm.errors import NO_NEED_LEVEL_REMARK
|
||||
|
@ -26,7 +26,6 @@ from apps.third.dahua import dhClient
|
|||
from apps.third.tapis import dhapis
|
||||
from apps.utils.export import export_excel
|
||||
from apps.utils.viewsets import CustomGenericViewSet, CustomModelViewSet
|
||||
from rest_framework.permissions import IsAuthenticated
|
||||
|
||||
epTypeOptions = {'employee': '正式员工', 'remployee': '相关方',
|
||||
'visitor': '访客', 'driver': '货车司机'}
|
||||
|
@ -221,8 +220,6 @@ class ClockRecordViewSet(ListModelMixin, CustomGenericViewSet):
|
|||
打卡记录
|
||||
"""
|
||||
perms_map = {'get': '*', 'post': '*'}
|
||||
authentication_classes = []
|
||||
permission_classes = [AllowAny]
|
||||
queryset = ClockRecord.objects.all()
|
||||
select_related_fields = ['employee']
|
||||
search_fields = ['employee__name', 'employee__number', 'employee__phone']
|
||||
|
|
Loading…
Reference in New Issue