diff options
author | Marcin Kuzminski <marcin@python-works.com> | 2013-02-14 23:34:59 +0100 |
---|---|---|
committer | Marcin Kuzminski <marcin@python-works.com> | 2013-02-14 23:34:59 +0100 |
commit | 6eeb175132f510c91f36145e8cb4fc7aa01ebfb7 (patch) | |
tree | 3c2026f2ede64aba5b809a0617369cf233fbff6a /rhodecode/lib/auth.py | |
parent | 9f2b1fd8b2e3c51212ffd709032dd51602248c42 (diff) |
fixes #762, LDAP and container created users are now activated based on
the registration settings in permissions
--HG--
extra : source : fdb0f59b21891c21c9b71d8d945d096a1f6a665d
Diffstat (limited to 'rhodecode/lib/auth.py')
-rw-r--r-- | rhodecode/lib/auth.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/rhodecode/lib/auth.py b/rhodecode/lib/auth.py index 6e4c1ba9..e2cf7189 100644 --- a/rhodecode/lib/auth.py +++ b/rhodecode/lib/auth.py @@ -226,6 +226,8 @@ def authenticate(username, password): 'name': safe_unicode(get_ldap_attr('ldap_attr_firstname')), 'lastname': safe_unicode(get_ldap_attr('ldap_attr_lastname')), 'email': get_ldap_attr('ldap_attr_email'), + 'active': 'hg.register.auto_activate' in User\ + .get_by_username('default').AuthUser.permissions['global'] } # don't store LDAP password since we don't need it. Override @@ -254,6 +256,8 @@ def login_container_auth(username): 'name': username, 'lastname': None, 'email': None, + 'active': 'hg.register.auto_activate' in User\ + .get_by_username('default').AuthUser.permissions['global'] } user = UserModel().create_for_container_auth(username, user_attrs) if not user: |