Adding defaults for open-oidc fields

This commit is contained in:
Joe Badaczewski 2020-12-02 13:50:05 -05:00
parent 5818b3edb3
commit 5d02a14bb1
2 changed files with 27 additions and 2 deletions

View file

@ -20,6 +20,31 @@ class ProxyHost extends Model {
this.domain_names = [];
}
// Default for openidc_discovery
if (typeof this.openidc_discovery === 'undefined') {
this.openidc_discovery = '';
}
// Default for openidc_client_id
if (typeof this.openidc_client_id === 'undefined') {
this.openidc_client_id = '';
}
// Default for openidc_client_secret
if (typeof this.openidc_client_secret === 'undefined') {
this.openidc_client_secret = '';
}
// Default for openidc_discovery
if (typeof this.openidc_discovery === 'undefined') {
this.openidc_discovery = '';
}
// Default for openidc_redirect_uri
if (typeof this.openidc_redirect_uri === 'undefined') {
this.openidc_redirect_uri = '';
}
// Default for openidc_allowed_users
if (typeof this.openidc_allowed_users === 'undefined') {
this.openidc_allowed_users = [];

View file

@ -43,8 +43,8 @@ module.exports = Mn.View.extend({
dns_provider_credentials: 'textarea[name="meta[dns_provider_credentials]"]',
propagation_seconds: 'input[name="meta[propagation_seconds]"]',
forward_scheme: 'select[name="forward_scheme"]',
letsencrypt: '.letsencrypt'
openidc_users: '.openidc_users'
letsencrypt: '.letsencrypt',
openidc_users: '.openidc_users',
openidc: '.openidc',
openidc_allowed_users: 'input[name="openidc_allowed_users"]',
openidc_restrict_users_enabled: 'input[name="openidc_restrict_users_enabled"]',