don't show register when external auth is used

This commit is contained in:
Henry Oswald 2016-10-21 15:43:58 +01:00
parent 6db09c2c15
commit 227666087c
2 changed files with 7 additions and 1 deletions

View file

@ -7,6 +7,7 @@
"grunt-contrib-rename": "0.0.3",
"grunt-docker-io": "^0.7.0",
"grunt-github-api": "^0.2.3",
"simple-git": "^1.32.1"
"simple-git": "^1.32.1",
"underscore": "^1.8.3"
}
}

View file

@ -1,4 +1,5 @@
Path = require('path')
_ = require("underscore")
# These credentials are used for authenticating api requests
# between services that may need to go over public channels
@ -391,6 +392,7 @@ if parse(process.env["SHARELATEX_IS_SERVER_PRO"]) == true
if process.env["SHARELATEX_LDAP_HOST"]
settings.externalAuth = true
settings.ldap =
host: process.env["SHARELATEX_LDAP_HOST"]
dn: process.env["SHARELATEX_LDAP_DN"]
@ -424,6 +426,9 @@ if process.env["SHARELATEX_LDAP_HOST"]
rejectUnauthorized: process.env["SHARELATEX_LDAP_TLS_OPTS_REJECT_UNAUTH"] == "true"
ca:ca_paths # e.g.'/etc/ldap/ca_certs.pem'
if settings.externalAuth
settings.nav.header = _.filter settings.nav.header, (button)-> button.url != "/register"
# Compiler
# --------
if process.env["SANDBOXED_COMPILES"] == "true"