update deploy configurations for self-registration feature.

This commit is contained in:
kunw 2016-03-30 18:43:56 +08:00
parent a8a009c7ac
commit 901d622327
3 changed files with 6 additions and 1 deletions

View File

@ -21,4 +21,6 @@ ldap_url = ldaps://ldap.mydomain.com
ldap_basedn = uid=%s,ou=people,dc=mydomain,dc=com
#The password for root user of db
db_password = root123
#Switch for self-registration feature
self_registration = off
#####

View File

@ -25,6 +25,7 @@ auth_mode = cp.get("configuration", "auth_mode")
ldap_url = cp.get("configuration", "ldap_url")
ldap_basedn = cp.get("configuration", "ldap_basedn")
db_password = cp.get("configuration", "db_password")
self_registration = cp.get("configuration", "self_registration")
########
base_dir = os.path.dirname(__file__)
@ -64,7 +65,8 @@ render(os.path.join(templates_dir, "ui", "env"),
auth_mode=auth_mode,
admin_pwd=harbor_admin_password,
ldap_url=ldap_url,
ldap_basedn=ldap_basedn)
ldap_basedn=ldap_basedn,
self_registration=self_registration)
render(os.path.join(templates_dir, "ui", "app.conf"),
ui_conf,

View File

@ -8,3 +8,4 @@ HARBOR_URL=$ui_url
AUTH_MODE=$auth_mode
LDAP_URL=$ldap_url
LDAP_BASE_DN=$ldap_basedn
SELF_REGISTRATION=$self_registration