Skip to content

Commit

Permalink
feat: Add id to user_context in build_user_context_for_anonymous_user.
Browse files Browse the repository at this point in the history
  • Loading branch information
Delsin Van Grembergen committed Sep 4, 2024
1 parent 830f5b3 commit 81fcb7f
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from abc import ABC, abstractmethod
from configuration import get_object_configuration_mapper # pyright: ignore
from copy import deepcopy
from elody.util import get_raw_id
from inuits_policy_based_auth.contexts.user_context import ( # pyright: ignore
UserContext,
)
Expand Down Expand Up @@ -46,6 +47,7 @@ def build_user_context_for_anonymous_user(
self, user_context: UserContext, user: dict
):
self.user = user
user_context.id = get_raw_id(user)
user_context.x_tenant = Tenant()
user_context.x_tenant.id = self.super_tenant_id
user_context.x_tenant.roles = ["anonymous"]
Expand Down

0 comments on commit 81fcb7f

Please sign in to comment.