🐛 Hide registration screen when registration is disabled

This commit is contained in:
Andrés Moya 2021-02-22 17:11:51 +01:00 committed by Andrey Antukh
parent 002a6f1e52
commit 688d649c4a
7 changed files with 40 additions and 23 deletions

View file

@ -79,6 +79,16 @@ update_login_with_ldap() {
fi
}
update_registration_enabled() {
if [ -n "$PENPOT_REGISTRATION_ENABLED" ]; then
log "Updating Registration Enabled: $PENPOT_REGISTRATION_ENABLED"
sed -i \
-e "s|^//var penpotRegistrationEnabled = .*;|var penpotRegistrationEnabled = $PENPOT_REGISTRATION_ENABLED;|g" \
"$1"
fi
}
update_public_uri /var/www/app/js/config.js
update_demo_warning /var/www/app/js/config.js
update_allow_demo_users /var/www/app/js/config.js
@ -86,5 +96,6 @@ update_google_client_id /var/www/app/js/config.js
update_gitlab_client_id /var/www/app/js/config.js
update_github_client_id /var/www/app/js/config.js
update_login_with_ldap /var/www/app/js/config.js
update_registration_enabled /var/www/app/js/config.js
exec "$@";