Add a field to specify a list of allowed emails when using OpenID Connect auth.

This commit is contained in:
Subv
2020-05-22 15:51:34 -05:00
parent a2992aeedc
commit 69b56ae73a
7 changed files with 149 additions and 7 deletions

View File

@@ -19,12 +19,18 @@ 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 = {};
}
this.domain_names.sort();
this.openidc_allowed_users.sort();
}
$beforeUpdate () {
@@ -34,6 +40,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 () {
@@ -45,7 +56,7 @@ class ProxyHost extends Model {
}
static get jsonAttributes () {
return ['domain_names', 'meta', 'locations'];
return ['domain_names', 'meta', 'locations', 'openidc_allowed_users'];
}
static get relationMappings () {