Skip to content

Commit

Permalink
rbac: filters: fix missing attribute for unauthenticated requests
Browse files Browse the repository at this point in the history
Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space>
  • Loading branch information
rissson committed Jun 10, 2024
1 parent adc0ec8 commit 0e70f3c
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", None) == 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 0e70f3c

Please sign in to comment.