升级到ReviewBoard 2.0后,LDAP身份验证无效

时间:2014-08-12 17:34:55

标签: python ldap upgrade review-board

从1.7升级到ReviewBoard 2.0之后,似乎LDAP认证方法就消失了。消失了,我的意思是它不再是后端了:

enter image description here

python-ldap已安装:

>>> import ldap
>>> ldap.__version__
'2.4.15'

当我启动交互式shell时,AUTHENTICATION_BACKENDS列表中没有LDAP后端:

>>> reviewboard.accounts.backends.get_backends()
[<reviewboard.accounts.backends.StandardAuthBackend object at 0x4259190>]
>>> from django.conf import settings
>>> settings.AUTHENTICATION_BACKENDS
(u'reviewboard.accounts.backends.StandardAuthBackend',)

1 个答案:

答案 0 :(得分:0)

最后,我使用virtualenv安装了ReviewBoard。不知道为什么但似乎新版本在mod_wsgi文件中没有这个时忽略了现有的后端:

activate_this = '/venv/bin/activate_this.py'
execfile(activate_this, dict(__file__=activate_this))

此外,站点配置应具有此功能(在django admin中:/ admin / db / siteconfig / siteconfiguration / 1 /):

"auth_backend": "ldap",

希望这有帮助。