Commit efe0e8f8 authored by Henry Oswald's avatar Henry Oswald

don't show register when external auth is used

parent 32c12334
Path = require('path') Path = require('path')
_ = require("underscore")
# These credentials are used for authenticating api requests # These credentials are used for authenticating api requests
# between services that may need to go over public channels # between services that may need to go over public channels
...@@ -391,6 +392,7 @@ if parse(process.env["SHARELATEX_IS_SERVER_PRO"]) == true ...@@ -391,6 +392,7 @@ if parse(process.env["SHARELATEX_IS_SERVER_PRO"]) == true
if process.env["SHARELATEX_LDAP_HOST"] if process.env["SHARELATEX_LDAP_HOST"]
settings.externalAuth = true
settings.ldap = settings.ldap =
host: process.env["SHARELATEX_LDAP_HOST"] host: process.env["SHARELATEX_LDAP_HOST"]
dn: process.env["SHARELATEX_LDAP_DN"] dn: process.env["SHARELATEX_LDAP_DN"]
...@@ -424,6 +426,9 @@ if process.env["SHARELATEX_LDAP_HOST"] ...@@ -424,6 +426,9 @@ if process.env["SHARELATEX_LDAP_HOST"]
rejectUnauthorized: process.env["SHARELATEX_LDAP_TLS_OPTS_REJECT_UNAUTH"] == "true" rejectUnauthorized: process.env["SHARELATEX_LDAP_TLS_OPTS_REJECT_UNAUTH"] == "true"
ca:ca_paths # e.g.'/etc/ldap/ca_certs.pem' 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 # Compiler
# -------- # --------
if process.env["SANDBOXED_COMPILES"] == "true" if process.env["SANDBOXED_COMPILES"] == "true"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment