With the transaction code changes th session.login() function was
incorrectly moved before all the userdata was gathered. An incomplete
set was stored in the session.
Signed-off-by: Simo Sorce <simo@redhat.com>
Reviewed-by: Patrick Uiterwijk <puiterwijk@redhat.com>
def auth_successful(self, trans, username, auth_type=None, userdata=None):
session = UserSession()
def auth_successful(self, trans, username, auth_type=None, userdata=None):
session = UserSession()
- session.login(username, userdata)
if self.info:
userattrs = self.info.get_user_attrs(username)
if self.info:
userattrs = self.info.get_user_attrs(username)
else:
userdata = {'auth_type': auth_type}
else:
userdata = {'auth_type': auth_type}
+ # create session login including all the userdata just gathered
+ session.login(username, userdata)
+
# save username into a cookie if parent was form base auth
if auth_type == 'password':
cookie = SecureCookie(USERNAME_COOKIE, username)
# save username into a cookie if parent was form base auth
if auth_type == 'password':
cookie = SecureCookie(USERNAME_COOKIE, username)