Mercurial > kallithea
diff rhodecode/lib/auth.py @ 3370:fdb0f59b2189 beta
fixes #762, LDAP and container created users are now activated based on
the registration settings in permissions
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Thu, 14 Feb 2013 23:34:59 +0100 |
parents | 14697de1598f |
children | 199fd214b213 |
line wrap: on
line diff
--- a/rhodecode/lib/auth.py Thu Feb 14 23:09:17 2013 +0100 +++ b/rhodecode/lib/auth.py Thu Feb 14 23:34:59 2013 +0100 @@ -226,6 +226,8 @@ '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 @@ '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: