fix: 工单权限 (#7808)

Co-authored-by: feng626 <1304903146@qq.com>
pull/7815/head
fit2bot 3 years ago committed by GitHub
parent 416d4bd0c3
commit f0325c48df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -4,6 +4,7 @@
from rest_framework import viewsets, mixins
from common.exceptions import JMSException
from common.utils import lazyproperty
from rbac.permissions import RBACPermission
from tickets import serializers
from tickets.models import Ticket
from tickets.permissions.comment import IsAssignee, IsApplicant, IsSwagger
@ -14,7 +15,7 @@ __all__ = ['CommentViewSet']
class CommentViewSet(mixins.CreateModelMixin, viewsets.ReadOnlyModelViewSet):
serializer_class = serializers.CommentSerializer
permission_classes = (IsSwagger | IsAssignee | IsApplicant,)
permission_classes = (RBACPermission| IsSwagger | IsAssignee | IsApplicant)
@lazyproperty
def ticket(self):

@ -19,7 +19,6 @@ __all__ = ['TicketViewSet', 'TicketFlowViewSet']
class TicketViewSet(CommonApiMixin, viewsets.ModelViewSet):
permission_classes = (IsValidUser,)
serializer_class = serializers.TicketDisplaySerializer
serializer_classes = {
'open': serializers.TicketApplySerializer,

Loading…
Cancel
Save