[pve-devel] [PATCH manager v2 1/3] ui: add Schema singleton

Dominik Csapak d.csapak at proxmox.com
Wed Jul 14 14:52:56 CEST 2021


and override the Proxmox.Schema.authDomains in its constructor

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
new in v2

 www/manager6/Makefile  |  1 +
 www/manager6/Schema.js | 53 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 54 insertions(+)
 create mode 100644 www/manager6/Schema.js

diff --git a/www/manager6/Makefile b/www/manager6/Makefile
index 75d355a5..0b0d833e 100644
--- a/www/manager6/Makefile
+++ b/www/manager6/Makefile
@@ -4,6 +4,7 @@ JSSRC= 							\
 	Parser.js					\
 	StateProvider.js				\
 	Utils.js					\
+	Schema.js					\
 	Toolkit.js					\
 	VNCConsole.js					\
 	button/ConsoleButton.js				\
diff --git a/www/manager6/Schema.js b/www/manager6/Schema.js
new file mode 100644
index 00000000..4e8ca8b9
--- /dev/null
+++ b/www/manager6/Schema.js
@@ -0,0 +1,53 @@
+Ext.define('PVE.Schema', { // a singleton
+    singleton: true,
+
+    constructor: function() {
+	var me = this;
+
+
+	Proxmox.Schema.overrideAuthDomains({
+	    ad: {
+		name: gettext('Active Directory Server'),
+		ipanel: 'pveAuthADPanel',
+		syncipanel: 'pveAuthLDAPSyncPanel',
+		add: true,
+		edit: true,
+		tfa: true,
+		pwchange: true,
+	    },
+	    ldap: {
+		name: gettext('LDAP Server'),
+		ipanel: 'pveAuthLDAPPanel',
+		syncipanel: 'pveAuthLDAPSyncPanel',
+		add: true,
+		edit: true,
+		tfa: true,
+		pwchange: true,
+	    },
+	    openid: {
+		name: gettext('OpenID Connect Server'),
+		ipanel: 'pveAuthOpenIDPanel',
+		add: true,
+		edit: true,
+		tfa: false,
+		pwchange: false,
+		iconCls: 'pmx-itype-icon-openid-logo',
+	    },
+	    pam: {
+		name: 'Linux PAM',
+		ipanel: 'pveAuthBasePanel',
+		add: false,
+		edit: true,
+		tfa: true,
+		pwchange: true,
+	    },
+	    pve: {
+		name: 'Proxmox VE authentication server',
+		ipanel: 'pveAuthBasePanel',
+		add: false,
+		edit: true,
+		pwchange: true,
+	    },
+	});
+    },
+});
-- 
2.30.2






More information about the pve-devel mailing list