add org-app endpoint & permissions

This commit is contained in:
adamscmRH
2018-03-19 11:30:37 -04:00
parent a7625b8747
commit e9a128138a
10 changed files with 226 additions and 133 deletions

View File

@@ -1598,6 +1598,18 @@ class UserAuthorizedTokenList(SubListCreateAPIView):
def get_queryset(self):
return get_access_token_model().objects.filter(application__isnull=False, user=self.request.user)
class OrganizationApplicationList(SubListCreateAPIView):
view_name = _("Organization OAuth2 Applications")
model = OAuth2Application
serializer_class = OAuth2ApplicationSerializer
parent_model = Organization
relationship = 'applications'
parent_key = 'organization'
swagger_topic = 'Authentication'
class OAuth2PersonalTokenList(SubListCreateAPIView):