0

从 1.7 升级到 ReviewBoard 2.0 后,LDAP 身份验证方法似乎完全消失了。消失的意思是它不再是后端:

在此处输入图像描述

python-ldap已安装:

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

但是,当我启动交互式 shell 时,LDAP 后端不在以下列表中AUTHENTICATION_BACKENDS

>>> 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',)
4

1 回答 1

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",

希望这可以帮助。

于 2014-08-12T19:02:22.200 回答