forked from YoLoveLife/DevOps
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e8a55e7
commit f2f161a
Showing
9 changed files
with
228 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
# -*- coding:utf-8 -*- | ||
from .. import models,serializers | ||
from rest_framework import generics | ||
from rest_framework.permissions import IsAuthenticated | ||
from django.contrib.auth.models import Permission | ||
from authority.permission import permission as PermissionPermission | ||
|
||
__all__ = [ | ||
"PermissionListAPI" | ||
] | ||
|
||
|
||
class PermissionListAPI(generics.ListAPIView): | ||
module = Permission | ||
serializer_class = serializers.PermissionSerializer | ||
queryset = Permission.objects.filter(codename__istartswith="yo_") | ||
permission_classes = [PermissionPermission.PermissionListRequiredMixin,IsAuthenticated] | ||
# -*- coding:utf-8 -*- | ||
from .. import models,serializers | ||
from rest_framework import generics | ||
from rest_framework.permissions import IsAuthenticated | ||
from django.contrib.auth.models import Permission | ||
from authority.permission import permission as PermissionPermission | ||
|
||
__all__ = [ | ||
"PermissionListAPI" | ||
] | ||
|
||
|
||
class PermissionListAPI(generics.ListAPIView): | ||
module = Permission | ||
serializer_class = serializers.PermissionSerializer | ||
queryset = Permission.objects.filter(codename__istartswith="yo_") | ||
permission_classes = [PermissionPermission.PermissionListRequiredMixin,IsAuthenticated] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.