Skip to content

Commit

Permalink
Merge pull request #333 from pkpdapp-team/i332-admin
Browse files Browse the repository at this point in the history
#332 superuser only gets own projects via api
  • Loading branch information
martinjrobins authored Jan 15, 2024
2 parents 7c1fbd6 + 0449105 commit 1ae7617
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions pkpdapp/pkpdapp/api/views/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ class UserAccessFilter(filters.BaseFilterBackend):
"""

def filter_queryset(self, request, queryset, view):
if request.user.is_superuser:
return queryset

user = request.user
if queryset.model == Project:
queryset = queryset.filter(users=user)
Expand Down

0 comments on commit 1ae7617

Please sign in to comment.