]>
git.proxmox.com Git - proxmox-widget-toolkit.git/blob - src/window/AuthEditBase.js
1 Ext
.define('Proxmox.window.AuthEditBase', {
2 extend
: 'Proxmox.window.Edit',
10 initComponent: function() {
13 me
.isCreate
= !me
.realm
;
16 me
.url
= '/api2/extjs/access/domains';
19 me
.url
= '/api2/extjs/access/domains/' + me
.realm
;
23 let authConfig
= Proxmox
.Schema
.authDomains
[me
.authType
];
25 throw 'unknown auth type';
26 } else if (!authConfig
.add
&& me
.isCreate
) {
27 throw 'trying to add non addable realm';
30 me
.subject
= authConfig
.name
;
34 if (authConfig
.syncipanel
) {
43 title
: gettext('General'),
45 xtype
: authConfig
.ipanel
,
46 isCreate
: me
.isCreate
,
50 title
: gettext('Sync Options'),
52 xtype
: authConfig
.syncipanel
,
53 isCreate
: me
.isCreate
,
61 xtype
: authConfig
.ipanel
,
62 isCreate
: me
.isCreate
,
76 success: function(response
, options
) {
77 var data
= response
.result
.data
|| {};
78 // just to be sure (should not happen)
79 if (data
.type
!== me
.authType
) {
81 throw "got wrong auth type";