mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
fix(auth): refresh the user record on successful auth
This will ensure the state of `request.user` is good to go for any other users which obtain it after the backend. Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
parent
d0e183a738
commit
c47578f158
1 changed files with 1 additions and 0 deletions
|
@ -122,6 +122,7 @@ class BasicAuthBackend(AuthenticationBackend):
|
|||
# exists, due to ForeignKey constraints in the schema upheld
|
||||
# by mysqlclient.
|
||||
user = db.query(User).filter(User.ID == record.UsersID).first()
|
||||
db.refresh(user)
|
||||
user.nonce = util.make_nonce()
|
||||
user.authenticated = True
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue