1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-01 08:21:15 +03:00

Fix up broken CredentialOwnerTeams view

Missing the object when requesting whether the user can access it or not
This commit is contained in:
Matthew Jones 2016-06-22 15:17:45 -04:00
parent 8d67d3a6fc
commit 960b6e22aa

View File

@ -1338,7 +1338,7 @@ class CredentialOwnerTeamsList(SubListAPIView):
def get_queryset(self):
credential = get_object_or_404(self.parent_model, pk=self.kwargs['pk'])
if not self.request.user.can_access(Credential, 'read', None):
if not self.request.user.can_access(Credential, 'read', credential):
raise PermissionDenied()
content_type = ContentType.objects.get_for_model(self.model)