settings: Import LDAP settings in prod_settings_template.

Currently users that try to deploy Zulip through docker has errors
because LDAP group search configuration can't be automated.

Reverts a hunk of f5197518a9.
This commit is contained in:
Flávio Prado 2021-04-24 00:57:04 +03:00 committed by Tim Abbott
parent 65249d90e9
commit 0c78131139
2 changed files with 3 additions and 1 deletions

View File

@ -7,6 +7,8 @@ from zulint.linters import run_pyflakes
def check_pyflakes(files: List[str], options: argparse.Namespace) -> bool: def check_pyflakes(files: List[str], options: argparse.Namespace) -> bool:
suppress_patterns = [ suppress_patterns = [
("scripts/lib/pythonrc.py", "imported but unused"), ("scripts/lib/pythonrc.py", "imported but unused"),
# LDAP imports are necessary for docker-zulip.
("zproject/prod_settings_template.py", "imported but unused"),
# Our ipython startup pythonrc file intentionally imports * # Our ipython startup pythonrc file intentionally imports *
("scripts/lib/pythonrc.py", " import *' used; unable to detect undefined names"), ("scripts/lib/pythonrc.py", " import *' used; unable to detect undefined names"),
( (

View File

@ -155,7 +155,7 @@ AUTHENTICATION_BACKENDS: Tuple[str, ...] = (
## optionally using LDAP as an authentication mechanism. ## optionally using LDAP as an authentication mechanism.
import ldap import ldap
from django_auth_ldap.config import LDAPSearch from django_auth_ldap.config import GroupOfNamesType, LDAPGroupQuery, LDAPSearch
## Connecting to the LDAP server. ## Connecting to the LDAP server.
## ##