mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-08-18 15:07:39 +00:00
added the text fields to Openidc defaults section
This commit is contained in:
@@ -20,12 +20,35 @@ class ProxyHost extends Model {
|
||||
this.domain_names = [];
|
||||
}
|
||||
|
||||
// Default for openidc_allowed_users
|
||||
if (typeof this.openidc_allowed_users === 'undefined') {
|
||||
this.openidc_allowed_users = [];
|
||||
}
|
||||
|
||||
// Default for meta
|
||||
if (typeof this.meta === 'undefined') {
|
||||
this.meta = {};
|
||||
}
|
||||
|
||||
// Openidc defaults
|
||||
if (typeof this.openidc_auth_method === 'undefined') {
|
||||
this.openidc_auth_method = 'client_secret_post';
|
||||
}
|
||||
if (typeof this.openidc_redirect_uri === 'undefined') {
|
||||
this.openidc_redirect_uri = '';
|
||||
}
|
||||
if (typeof this.openidc_discovery === 'undefined') {
|
||||
this.openidc_discovery = '';
|
||||
}
|
||||
if (typeof this.openidc_client_id === 'undefined') {
|
||||
this.openidc_client_id = '';
|
||||
}
|
||||
if (typeof this.openidc_client_secret === 'undefined') {
|
||||
this.openidc_client_secret = '';
|
||||
}
|
||||
|
||||
this.domain_names.sort();
|
||||
this.openidc_allowed_users.sort();
|
||||
}
|
||||
|
||||
$beforeUpdate () {
|
||||
@@ -35,6 +58,11 @@ class ProxyHost extends Model {
|
||||
if (typeof this.domain_names !== 'undefined') {
|
||||
this.domain_names.sort();
|
||||
}
|
||||
|
||||
// Sort openidc_allowed_users
|
||||
if (typeof this.openidc_allowed_users !== 'undefined') {
|
||||
this.openidc_allowed_users.sort();
|
||||
}
|
||||
}
|
||||
|
||||
static get name () {
|
||||
@@ -46,7 +74,7 @@ class ProxyHost extends Model {
|
||||
}
|
||||
|
||||
static get jsonAttributes () {
|
||||
return ['domain_names', 'meta', 'locations'];
|
||||
return ['domain_names', 'meta', 'locations', 'openidc_allowed_users'];
|
||||
}
|
||||
|
||||
static get relationMappings () {
|
||||
@@ -91,4 +119,4 @@ class ProxyHost extends Model {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = ProxyHost;
|
||||
module.exports = ProxyHost;
|
Reference in New Issue
Block a user