This is an automated email from the ASF dual-hosted git repository.
machristie pushed a commit to branch staging
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal.git
The following commit(s) were added to refs/heads/staging by this push:
new fc3748b AIRAVATA-3490 Fixes gateway admin check
fc3748b is described below
commit fc3748b48d5f2ed2bff6c6a4b82578747e612709
Author: Marcus Christie <[email protected]>
AuthorDate: Sun Jul 18 14:15:42 2021 -0400
AIRAVATA-3490 Fixes gateway admin check
---
django_airavata/apps/auth/views.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/django_airavata/apps/auth/views.py
b/django_airavata/apps/auth/views.py
index 06d3cad..45f3b79 100644
--- a/django_airavata/apps/auth/views.py
+++ b/django_airavata/apps/auth/views.py
@@ -557,7 +557,7 @@ class UserViewSet(viewsets.ModelViewSet):
def get_queryset(self):
user = self.request.user
- if user.is_gateway_admin:
+ if self.request.is_gateway_admin:
return get_user_model().objects.all()
else:
return get_user_model().objects.filter(pk=user.pk)