Skip to content

Commit

Permalink
rbac: check user type correctly
Browse files Browse the repository at this point in the history
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
  • Loading branch information
BeryJu committed Aug 22, 2024
1 parent 19318d4 commit 38154f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion authentik/rbac/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def filter_queryset(self, request: Request, queryset: QuerySet, view) -> QuerySe
# Outposts (which are the only objects using internal service accounts)
# except requests to return an empty list when they have no objects
# assigned
if request.user.type == UserTypes.INTERNAL_SERVICE_ACCOUNT:
if getattr(request.user, "type", UserTypes.INTERNAL) == UserTypes.INTERNAL_SERVICE_ACCOUNT:
return queryset
if not queryset.exists():
# User doesn't have direct permission to all objects
Expand Down

0 comments on commit 38154f7

Please sign in to comment.