mirror of https://github.com/jumpserver/jumpserver
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.
16 lines
391 B
16 lines
391 B
1 year ago
|
from rest_framework.generics import ListAPIView
|
||
|
|
||
|
from assets import serializers
|
||
|
from assets.const import Protocol
|
||
|
from common.permissions import IsValidUser
|
||
|
|
||
|
__all__ = ['ProtocolListApi']
|
||
|
|
||
|
|
||
|
class ProtocolListApi(ListAPIView):
|
||
|
serializer_class = serializers.ProtocolSerializer
|
||
|
permission_classes = (IsValidUser,)
|
||
|
|
||
|
def get_queryset(self):
|
||
|
return list(Protocol.protocols())
|