mirror of
https://github.com/ansible/awx.git
synced 2026-03-20 10:27:34 -02:30
Fix up broken CredentialOwnerTeams view
Missing the object when requesting whether the user can access it or not
This commit is contained in:
@@ -1338,7 +1338,7 @@ class CredentialOwnerTeamsList(SubListAPIView):
|
|||||||
|
|
||||||
def get_queryset(self):
|
def get_queryset(self):
|
||||||
credential = get_object_or_404(self.parent_model, pk=self.kwargs['pk'])
|
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()
|
raise PermissionDenied()
|
||||||
|
|
||||||
content_type = ContentType.objects.get_for_model(self.model)
|
content_type = ContentType.objects.get_for_model(self.model)
|
||||||
|
|||||||
Reference in New Issue
Block a user