mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-12-18 10:37:11 +00:00
Fix to use user rather than user_with_token in authenticated credentials
This commit is contained in:
parent
771f9bcfa1
commit
48b9116195
1 changed files with 1 additions and 3 deletions
|
@ -82,9 +82,7 @@ class UserAuthenticationBackend(AuthenticationBackend):
|
|||
or subscription_state == SubscriptionState.TRIAL.value
|
||||
)
|
||||
if subscribed:
|
||||
return AuthCredentials(["authenticated", "subscribed"]), AuthenticatedKhojUser(
|
||||
user_with_token.user
|
||||
)
|
||||
return AuthCredentials(["authenticated", "subscribed"]), AuthenticatedKhojUser(user)
|
||||
return AuthCredentials(["authenticated"]), AuthenticatedKhojUser(user)
|
||||
return AuthCredentials(["authenticated", "subscribed"]), AuthenticatedKhojUser(user)
|
||||
if len(request.headers.get("Authorization", "").split("Bearer ")) == 2:
|
||||
|
|
Loading…
Reference in a new issue