mirror of https://github.com/jumpserver/jumpserver
parent
416d4bd0c3
commit
f0325c48df
|
@ -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…
Reference in New Issue