diff --git a/authentik/core/api/users.py b/authentik/core/api/users.py index 5b6a4a1990..2bb18e0c62 100644 --- a/authentik/core/api/users.py +++ b/authentik/core/api/users.py @@ -227,9 +227,9 @@ class UserSelfSerializer(ModelSerializer): def get_system_permissions(self, user: User) -> list[str]: """Get all system permissions assigned to the user""" return list( - user.user_permissions.filter( - content_type__app_label="authentik_rbac", content_type__model="systempermission" - ).values_list("codename", flat=True) + x.split(".", maxsplit=1)[1] + for x in user.get_all_permissions() + if x.startswith("authentik_rbac") ) class Meta: