From 5c085daf0b8b909ffe55d95e240425de97e046ab Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Fri, 9 Jul 2021 16:11:19 +0200 Subject: [PATCH] add schema and move authDomains there Signed-off-by: Thomas Lamprecht --- src/Makefile | 1 + src/Schema.js | 27 +++++++++++++++++++++++++++ src/Utils.js | 24 ------------------------ 3 files changed, 28 insertions(+), 24 deletions(-) create mode 100644 src/Schema.js diff --git a/src/Makefile b/src/Makefile index 41b4dc2..4e438b2 100644 --- a/src/Makefile +++ b/src/Makefile @@ -8,6 +8,7 @@ MARKEDJS=/usr/share/javascript/marked/marked.min.js JSSRC= \ Utils.js \ + Schema.js \ Toolkit.js \ Logo.js \ Parser.js \ diff --git a/src/Schema.js b/src/Schema.js new file mode 100644 index 0000000..b8fc11f --- /dev/null +++ b/src/Schema.js @@ -0,0 +1,27 @@ +Ext.define('Proxmox.Schema', { // a singleton + singleton: true, + + authDomains: { + pam: { + name: 'Linux PAM', + add: false, + edit: false, + pwchange: true, + }, + openid: { + name: gettext('OpenID Connect Server'), + ipanel: 'pmxAuthOpenIDPanel', + add: true, + edit: true, + tfa: false, + pwchange: false, + iconCls: 'pmx-itype-icon-openid-logo', + }, + }, + // to add or change existing for product specific ones + overrideAuthDomains: function(extra) { + for (const [key, value] of Object.entries(extra)) { + Proxmox.Utils.authSchema[key] = value; + } + }, +}); diff --git a/src/Utils.js b/src/Utils.js index 167679d..ab85dee 100644 --- a/src/Utils.js +++ b/src/Utils.js @@ -1151,30 +1151,6 @@ utilities: { return icon; }, - authSchema: { - pam: { - name: 'Linux PAM', - add: false, - edit: false, - pwchange: true, - }, - openid: { - name: gettext('OpenID Connect Server'), - ipanel: 'pmxAuthOpenIDPanel', - add: true, - edit: true, - tfa: false, - pwchange: false, - iconCls: 'pmx-itype-icon-openid-logo', - }, - }, - - // to add or change existing for product specific ones - overrideAuthSchema: function(extra) { - for (const [key, value] of Object.entries(extra)) { - Proxmox.Utils.authSchema[key] = value; - } - }, }, singleton: true, -- 2.39.2