mirror of
https://git.proxmox.com/git/proxmox-widget-toolkit
synced 2025-08-07 10:16:03 +00:00
add schema and move authDomains there
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
8f30708d44
commit
5c085daf0b
@ -8,6 +8,7 @@ MARKEDJS=/usr/share/javascript/marked/marked.min.js
|
|||||||
|
|
||||||
JSSRC= \
|
JSSRC= \
|
||||||
Utils.js \
|
Utils.js \
|
||||||
|
Schema.js \
|
||||||
Toolkit.js \
|
Toolkit.js \
|
||||||
Logo.js \
|
Logo.js \
|
||||||
Parser.js \
|
Parser.js \
|
||||||
|
27
src/Schema.js
Normal file
27
src/Schema.js
Normal file
@ -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;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
});
|
24
src/Utils.js
24
src/Utils.js
@ -1151,30 +1151,6 @@ utilities: {
|
|||||||
return icon;
|
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,
|
singleton: true,
|
||||||
|
Loading…
Reference in New Issue
Block a user