You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
jumpserver/apps/ops/api/adhoc.py

23 lines
444 B

# -*- coding: utf-8 -*-
#
from rest_framework_bulk import BulkModelViewSet
from common.mixins import CommonApiMixin
from ..models import AdHoc
from ..serializers import (
AdHocSerializer
)
__all__ = [
'AdHocViewSet'
]
class AdHocViewSet(CommonApiMixin, BulkModelViewSet):
serializer_class = AdHocSerializer
permission_classes = ()
def get_queryset(self):
return AdHoc.objects.filter(creator=self.request.user)