Skip to content

Commit

Permalink
remove uneeded auth ldap settings
Browse files Browse the repository at this point in the history
* I had thought that setting the settings was required. But carefully
selected defaults for the settings is the correct way to deal with
errors I was seeing early in developing this feature.
  • Loading branch information
chrismeyersfsu committed Mar 23, 2018
1 parent 1c578cd commit cb7e178
Showing 1 changed file with 0 additions and 34 deletions.
34 changes: 0 additions & 34 deletions awx/settings/defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,40 +355,6 @@ def IS_TESTING(argv=None):
ldap.OPT_NETWORK_TIMEOUT: 30
}

# LDAP Backend settings
_AUTH_LDAP_SETTINGS_BASE = {
"AUTH_LDAP_SERVER_URI": "",
"AUTH_LDAP_BIND_DN": "",
"AUTH_LDAP_BIND_PASSWORD": "",
"AUTH_LDAP_START_TLS": False,
"AUTH_LDAP_USER_SEARCH": [],
"AUTH_LDAP_USER_DN_TEMPLATE": None,
"AUTH_LDAP_USER_ATTR_MAP": {},
"AUTH_LDAP_GROUP_SEARCH": [],
"AUTH_LDAP_GROUP_TYPE": None,
"AUTH_LDAP_GROUP_TYPE_PARAMS": {},
"AUTH_LDAP_REQUIRE_GROUP": None,
"AUTH_LDAP_DENY_GROUP": None,
"AUTH_LDAP_USER_FLAGS_BY_GROUP": {},
"AUTH_LDAP_ORGANIZATION_MAP": {},
"AUTH_LDAP_TEAM_MAP": {},
}


def generate_ldap_backend(kv, count=None):
num = ''
if count is not None:
num = '{}_'.format(count)
for k,v in kv.iteritems():
new_k = k.replace('AUTH_LDAP_', 'AUTH_LDAP_{}'.format(num))
setattr(sys.modules[__name__], new_k, v)


generate_ldap_backend(_AUTH_LDAP_SETTINGS_BASE)
for i in xrange(1, 5):
generate_ldap_backend(_AUTH_LDAP_SETTINGS_BASE, i)


# Radius server settings (default to empty string to skip using Radius auth).
# Note: These settings may be overridden by database settings.
RADIUS_SERVER = ''
Expand Down

0 comments on commit cb7e178

Please sign in to comment.