# HG changeset patch # User Marcin Kuzminski # Date 2010-07-21 20:57:36 # Node ID 5bbcc0cac38936b499293f77210a9920b1bbc2c6 # Parent 7a086a83f00b43640c6c8c41d3e39ad7b22031e4 added session remove in forms, and added name and lastname to auth user diff --git a/pylons_app/lib/auth.py b/pylons_app/lib/auth.py --- a/pylons_app/lib/auth.py +++ b/pylons_app/lib/auth.py @@ -77,6 +77,8 @@ class AuthUser(object): """ def __init__(self): self.username = 'None' + self.name = '' + self.lastname = '' self.user_id = None self.is_authenticated = False self.is_admin = False diff --git a/pylons_app/model/forms.py b/pylons_app/model/forms.py --- a/pylons_app/model/forms.py +++ b/pylons_app/model/forms.py @@ -97,6 +97,8 @@ class ValidAuth(formencode.validators.Fa auth_user.is_authenticated = True auth_user.is_admin = user.admin auth_user.user_id = user.user_id + auth_user.name = user.name + auth_user.lastname = user.lastname session['hg_app_user'] = auth_user session.save() log.info('user %s is now authenticated', username) @@ -122,7 +124,7 @@ class ValidAuth(formencode.validators.Fa value, state, error_dict=self.e_dict_disable) - + meta.Session.remove() class ValidRepoUser(formencode.validators.FancyValidator): def to_python(self, value, state):