Mercurial > public > src > rhodecode
diff pylons_app/model/forms.py @ 227:351013049742
CHanged form error when user account is disabled.
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Wed, 26 May 2010 23:55:48 +0200 |
parents | 5af2cd31c99b |
children | a0116e944da1 |
line wrap: on
line diff
--- a/pylons_app/model/forms.py Wed May 26 23:55:20 2010 +0200 +++ b/pylons_app/model/forms.py Wed May 26 23:55:48 2010 +0200 @@ -59,6 +59,7 @@ #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 @@ 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)