summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2017-11-03 08:45:19 -0700
committerGitHub <noreply@github.com>2017-11-03 08:45:19 -0700
commit59fe80990913d220926c847d234b7066ca0f6ada (patch)
tree4007276dcdc67c9748b0f35e9a4dd71ae7c1917c /Makefile
parentd5dbdb273703a3add0f1c3287aa531854ab30269 (diff)
downloadchat-59fe80990913d220926c847d234b7066ca0f6ada.tar.gz
chat-59fe80990913d220926c847d234b7066ca0f6ada.tar.bz2
chat-59fe80990913d220926c847d234b7066ca0f6ada.zip
Adding ldap Makefile tool to add local LDAP configuration (#7764)
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile19
1 files changed, 19 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 4b0dad504..e4cd6e3ed 100644
--- a/Makefile
+++ b/Makefile
@@ -418,6 +418,25 @@ run-job-server:
@echo Running job server for development
$(GO) run $(GOFLAGS) $(GO_LINKER_FLAGS) $(PLATFORM_FILES) jobserver --disableconfigwatch &
+config-ldap:
+ @echo Setting up configuration for local LDAP
+
+ @sed -i'' -e 's|"LdapServer": ".*"|"LdapServer": "dockerhost"|g' config/config.json
+ @sed -i'' -e 's|"BaseDN": ".*"|"BaseDN": "ou=testusers,dc=mm,dc=test,dc=com"|g' config/config.json
+ @sed -i'' -e 's|"BindUsername": ".*"|"BindUsername": "cn=admin,dc=mm,dc=test,dc=com"|g' config/config.json
+ @sed -i'' -e 's|"BindPassword": ".*"|"BindPassword": "mostest"|g' config/config.json
+ @sed -i'' -e 's|"FirstNameAttribute": ".*"|"FirstNameAttribute": "cn"|g' config/config.json
+ @sed -i'' -e 's|"LastNameAttribute": ".*"|"LastNameAttribute": "sn"|g' config/config.json
+ @sed -i'' -e 's|"NicknameAttribute": ".*"|"NicknameAttribute": "cn"|g' config/config.json
+ @sed -i'' -e 's|"EmailAttribute": ".*"|"EmailAttribute": "mail"|g' config/config.json
+ @sed -i'' -e 's|"UsernameAttribute": ".*"|"UsernameAttribute": "uid"|g' config/config.json
+ @sed -i'' -e 's|"IdAttribute": ".*"|"IdAttribute": "uid"|g' config/config.json
+
+config-reset:
+ @echo Resetting configuration to default
+ rm -f config/config.json
+ cp config/default.json config/config.json
+
clean: stop-docker
@echo Cleaning