From 05944e8585c846609c1e70bbfa2a47622c55aedc Mon Sep 17 00:00:00 2001 From: Ivan Filippov Date: Mon, 11 Apr 2016 10:22:40 -0600 Subject: [PATCH] Don't require LDAP group parameters if LDAP_GROUP_SECURITY is not chosen --- app/models.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/models.py b/app/models.py index 84093d4..811a151 100644 --- a/app/models.py +++ b/app/models.py @@ -20,8 +20,9 @@ LDAP_PASSWORD = app.config['LDAP_PASSWORD'] LDAP_SEARCH_BASE = app.config['LDAP_SEARCH_BASE'] LDAP_TYPE = app.config['LDAP_TYPE'] LDAP_GROUP_SECURITY = app.config['LDAP_GROUP_SECURITY'] -LDAP_ADMIN_GROUP = app.config['LDAP_ADMIN_GROUP'] -LDAP_USER_GROUP = app.config['LDAP_USER_GROUP'] +if LDAP_GROUP_SECURITY == True: + LDAP_ADMIN_GROUP = app.config['LDAP_ADMIN_GROUP'] + LDAP_USER_GROUP = app.config['LDAP_USER_GROUP'] PDNS_STATS_URL = app.config['PDNS_STATS_URL'] PDNS_API_KEY = app.config['PDNS_API_KEY']