Sync Blender ID badge as soon as user logs in

This adds a new Blinker signal `user_logged_in` that is only sent when
the user logs in via the web interface (and not on every token
authentication and every API call).
This commit is contained in:
2018-10-10 16:32:20 +02:00
parent 314ce40e71
commit b4ee5b59bd
4 changed files with 164 additions and 21 deletions

View File

@@ -189,7 +189,7 @@ def validate_this_token(token, oauth_subclient=None):
return None
g.current_user = UserClass.construct(token, db_user)
user_authenticated.send(sender=g.current_user)
user_authenticated.send(g.current_user)
return db_user