diff --git a/src/middlewared/middlewared/auth.py b/src/middlewared/middlewared/auth.py index c4b02df229e71..5f11e997fab55 100644 --- a/src/middlewared/middlewared/auth.py +++ b/src/middlewared/middlewared/auth.py @@ -81,15 +81,15 @@ def dump(self): class TokenSessionManagerCredentials(SessionManagerCredentials): def __init__(self, token_manager, token): - root_credentials = token.root_credentials() + self.root_credentials = token.root_credentials() self.token_manager = token_manager self.token = token - self.is_user_session = root_credentials.is_user_session + self.is_user_session = self.root_credentials.is_user_session if self.is_user_session: - self.user = root_credentials.user + self.user = self.root_credentials.user - self.allowlist = root_credentials.allowlist + self.allowlist = self.root_credentials.allowlist def is_valid(self): return self.token.is_valid()