Changeset - 351013049742
[Not reviewed]
default
0 1 0
Marcin Kuzminski - 15 years ago 2010-05-26 23:55:48
marcin@python-works.com
CHanged form error when user account is disabled.
1 file changed with 3 insertions and 1 deletions:
0 comments (0 inline, 0 general)
pylons_app/model/forms.py
Show inline comments
 
@@ -59,6 +59,7 @@ class ValidAuth(formencode.validators.Fa
 
    #error mapping
 
    e_dict = {'username':messages['invalid_login'],
 
              'password':messages['invalid_password']}
 
    e_dict_disable = {'username':messages['disabled_account']}
 
    
 
    def validate_python(self, value, state):
 
        sa = meta.Session
 
@@ -90,7 +91,8 @@ class ValidAuth(formencode.validators.Fa
 
                log.warning('user %s is disabled', username)
 
                raise formencode.Invalid(self.message('disabled_account',
 
                                         state=State_obj),
 
                                         value, state, error_dict=self.e_dict)
 
                                         value, state,
 
                                         error_dict=self.e_dict_disable)
 
            
 
            
 
        
0 comments (0 inline, 0 general)