Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add management command to dump auth config data to a file #2082

Merged
merged 10 commits into from
Mar 1, 2024
Prev Previous commit
Next Next commit
Lint
No-Issue
bmclaughlin committed Feb 28, 2024
commit 925b7b14341766b24b77e2641ab02b0ce333b062
21 changes: 12 additions & 9 deletions galaxy_ng/app/management/commands/dump_auth_config.py
Original file line number Diff line number Diff line change
@@ -53,21 +53,24 @@ def post_config_ldap(self):
AUTH_LDAP_USER_SEARCH_BASE_DN = settings.get("AUTH_LDAP_USER_SEARCH_BASE_DN", default=None)
AUTH_LDAP_USER_SEARCH_SCOPE = settings.get("AUTH_LDAP_USER_SEARCH_SCOPE", default=None)
AUTH_LDAP_USER_SEARCH_FILTER = settings.get("AUTH_LDAP_USER_SEARCH_FILTER", default=None)
AUTH_LDAP_GROUP_SEARCH_BASE_DN = settings.get("AUTH_LDAP_GROUP_SEARCH_BASE_DN", default=None)
AUTH_LDAP_GROUP_SEARCH_BASE_DN = settings.get(
"AUTH_LDAP_GROUP_SEARCH_BASE_DN",
default=None
)
AUTH_LDAP_GROUP_SEARCH_SCOPE = settings.get("AUTH_LDAP_GROUP_SEARCH_SCOPE", default=None)
AUTH_LDAP_GROUP_SEARCH_FILTER = settings.get("AUTH_LDAP_GROUP_SEARCH_FILTER", default=None)

post_config["USER_SEARCH"] = [
AUTH_LDAP_USER_SEARCH_BASE_DN,
AUTH_LDAP_USER_SEARCH_SCOPE,
AUTH_LDAP_USER_SEARCH_FILTER,
]
AUTH_LDAP_USER_SEARCH_BASE_DN,
AUTH_LDAP_USER_SEARCH_SCOPE,
AUTH_LDAP_USER_SEARCH_FILTER,
]

post_config["GROUP_SEARCH"] = [
AUTH_LDAP_GROUP_SEARCH_BASE_DN,
AUTH_LDAP_GROUP_SEARCH_SCOPE,
AUTH_LDAP_GROUP_SEARCH_FILTER,
]
AUTH_LDAP_GROUP_SEARCH_BASE_DN,
AUTH_LDAP_GROUP_SEARCH_SCOPE,
AUTH_LDAP_GROUP_SEARCH_FILTER,
]

# Configure GROUP_TYPE
post_config["GROUP_TYPE"] = None