Fix logins.
This commit is contained in:
parent
984e14f9c5
commit
053ae056ce
1 changed files with 3 additions and 3 deletions
|
@ -15,10 +15,10 @@ logger = logging.getLogger(__name__)
|
|||
|
||||
|
||||
class _LoginWrappedDBUser(UserMixin):
|
||||
def __init__(self, db_username):
|
||||
def __init__(self, db_username, db_user=None):
|
||||
|
||||
self._db_username = db_username
|
||||
self._db_user = None
|
||||
self._db_user = db_user
|
||||
|
||||
def db_user(self):
|
||||
if not self._db_user:
|
||||
|
@ -83,7 +83,7 @@ def privacy():
|
|||
|
||||
|
||||
def common_login(db_user):
|
||||
if login_user(_LoginWrappedDBUser(db_user)):
|
||||
if login_user(_LoginWrappedDBUser(db_user.username, db_user)):
|
||||
logger.debug('Successfully signed in as: %s' % db_user.username)
|
||||
new_identity = QuayDeferredPermissionUser(db_user.username, 'username')
|
||||
identity_changed.send(app, identity=new_identity)
|
||||
|
|
Reference in a new issue