mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-06 13:22:12 +00:00
Fix to use user rather than user_with_token in authenticated credentials
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user