diff --git a/rhodecode/authentication/plugins/auth_crowd.py b/rhodecode/authentication/plugins/auth_crowd.py --- a/rhodecode/authentication/plugins/auth_crowd.py +++ b/rhodecode/authentication/plugins/auth_crowd.py @@ -222,7 +222,7 @@ class RhodeCodeAuthPlugin(RhodeCodeExter @hybrid_property def name(self): - return "crowd" + return u"crowd" def use_fake_password(self): return True diff --git a/rhodecode/authentication/plugins/auth_headers.py b/rhodecode/authentication/plugins/auth_headers.py --- a/rhodecode/authentication/plugins/auth_headers.py +++ b/rhodecode/authentication/plugins/auth_headers.py @@ -102,7 +102,7 @@ class RhodeCodeAuthPlugin(RhodeCodeExter @hybrid_property def name(self): - return 'headers' + return u"headers" @property def is_headers_auth(self): diff --git a/rhodecode/authentication/plugins/auth_jasig_cas.py b/rhodecode/authentication/plugins/auth_jasig_cas.py --- a/rhodecode/authentication/plugins/auth_jasig_cas.py +++ b/rhodecode/authentication/plugins/auth_jasig_cas.py @@ -94,7 +94,7 @@ class RhodeCodeAuthPlugin(RhodeCodeExter @hybrid_property def name(self): - return "jasig-cas" + return u"jasig-cas" @property def is_headers_auth(self): diff --git a/rhodecode/authentication/plugins/auth_ldap.py b/rhodecode/authentication/plugins/auth_ldap.py --- a/rhodecode/authentication/plugins/auth_ldap.py +++ b/rhodecode/authentication/plugins/auth_ldap.py @@ -53,7 +53,7 @@ class LdapError(Exception): pass -def plugin_factory(plugin_id, *args, **kwargs): +def plugin_factory(plugin_id, *args, **kwds): """ Factory function that is called during plugin discovery. It returns the plugin instance. @@ -350,6 +350,16 @@ class LdapSettingsSchema(AuthnPluginSett title=_('Login Attribute'), missing_msg=_('The LDAP Login attribute of the CN must be specified'), widget='string') + attr_email = colander.SchemaNode( + colander.String(), + default='', + description=_('LDAP Attribute to map to email address (e.g., mail).\n' + 'Emails are a crucial part of RhodeCode. \n' + 'If possible add a valid email attribute to ldap users.'), + missing='', + preparer=strip_whitespace, + title=_('Email Attribute'), + widget='string') attr_firstname = colander.SchemaNode( colander.String(), default='', @@ -366,16 +376,6 @@ class LdapSettingsSchema(AuthnPluginSett preparer=strip_whitespace, title=_('Last Name Attribute'), widget='string') - attr_email = colander.SchemaNode( - colander.String(), - default='', - description=_('LDAP Attribute to map to email address (e.g., mail).\n' - 'Emails are a crucial part of RhodeCode. \n' - 'If possible add a valid email attribute to ldap users.'), - missing='', - preparer=strip_whitespace, - title=_('Email Attribute'), - widget='string') class RhodeCodeAuthPlugin(RhodeCodeExternalAuthPlugin): @@ -414,7 +414,7 @@ class RhodeCodeAuthPlugin(RhodeCodeExter @hybrid_property def name(self): - return "ldap" + return u"ldap" def use_fake_password(self): return True diff --git a/rhodecode/authentication/plugins/auth_pam.py b/rhodecode/authentication/plugins/auth_pam.py --- a/rhodecode/authentication/plugins/auth_pam.py +++ b/rhodecode/authentication/plugins/auth_pam.py @@ -104,7 +104,7 @@ class RhodeCodeAuthPlugin(RhodeCodeExter @hybrid_property def name(self): - return "pam" + return u"pam" def get_settings_schema(self): return PamSettingsSchema() diff --git a/rhodecode/authentication/plugins/auth_rhodecode.py b/rhodecode/authentication/plugins/auth_rhodecode.py --- a/rhodecode/authentication/plugins/auth_rhodecode.py +++ b/rhodecode/authentication/plugins/auth_rhodecode.py @@ -73,7 +73,7 @@ class RhodeCodeAuthPlugin(RhodeCodeAuthP @hybrid_property def name(self): - return "rhodecode" + return u"rhodecode" def user_activation_state(self): def_user_perms = User.get_default_user().AuthUser().permissions['global'] diff --git a/rhodecode/authentication/plugins/auth_token.py b/rhodecode/authentication/plugins/auth_token.py --- a/rhodecode/authentication/plugins/auth_token.py +++ b/rhodecode/authentication/plugins/auth_token.py @@ -76,7 +76,7 @@ class RhodeCodeAuthPlugin(RhodeCodeAuthP @hybrid_property def name(self): - return "authtoken" + return u"authtoken" def user_activation_state(self): def_user_perms = User.get_default_user().AuthUser().permissions['global']