aboutsummaryrefslogtreecommitdiff
path: root/rhodecode/lib/auth.py
diff options
context:
space:
mode:
Diffstat (limited to 'rhodecode/lib/auth.py')
-rw-r--r--rhodecode/lib/auth.py4
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: