You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2014/06/06 19:16:57 UTC
[3/3] git commit: [#7409] put max/min pwd defaults into code,
so .ini changes not required
[#7409] put max/min pwd defaults into code, so .ini changes not required
Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/6c540c27
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/6c540c27
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/6c540c27
Branch: refs/heads/master
Commit: 6c540c270ec10f9ebd314b1ebf8b4073b2e34dfa
Parents: 753a496
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Fri Jun 6 17:16:22 2014 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Fri Jun 6 17:16:22 2014 +0000
----------------------------------------------------------------------
Allura/allura/lib/widgets/forms.py | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/allura/blob/6c540c27/Allura/allura/lib/widgets/forms.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/widgets/forms.py b/Allura/allura/lib/widgets/forms.py
index 4007a84..c181d75 100644
--- a/Allura/allura/lib/widgets/forms.py
+++ b/Allura/allura/lib/widgets/forms.py
@@ -142,8 +142,8 @@ class PasswordChangeBase(ForgeForm):
label='New Password',
validator=fev.UnicodeString(
not_empty=True,
- min=asint(tg.config['auth.min_password_len']),
- max=asint(tg.config['auth.max_password_len']))),
+ min=asint(tg.config.get('auth.min_password_len', 6)),
+ max=asint(tg.config.get('auth.max_password_len', 30)))),
ew.PasswordField(
name='pw2',
label='New Password (again)',
@@ -172,8 +172,8 @@ class PasswordChangeForm(PasswordChangeBase):
label='New Password',
validator=fev.UnicodeString(
not_empty=True,
- min=asint(tg.config['auth.min_password_len']),
- max=asint(tg.config['auth.max_password_len']))),
+ min=asint(tg.config.get('auth.min_password_len', 6)),
+ max=asint(tg.config.get('auth.max_password_len', 30)))),
ew.PasswordField(
name='pw2',
label='New Password (again)',
@@ -723,8 +723,8 @@ class RegistrationForm(ForgeForm):
label='New Password',
validator=fev.UnicodeString(
not_empty=True,
- min=asint(tg.config['auth.min_password_len']),
- max=asint(tg.config['auth.max_password_len']))),
+ min=asint(tg.config.get('auth.min_password_len', 6)),
+ max=asint(tg.config.get('auth.max_password_len', 30)))),
ew.PasswordField(
name='pw2',
label='New Password (again)',