mirror of
https://git.proxmox.com/git/proxmox-widget-toolkit
synced 2025-12-30 20:29:53 +00:00
panel: AuthView: make useTypeInUrl property per-realm
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
This commit is contained in:
parent
3822a031dd
commit
be8cb1efb4
@ -8,6 +8,7 @@ Ext.define('Proxmox.Schema', { // a singleton
|
||||
edit: false,
|
||||
pwchange: true,
|
||||
sync: false,
|
||||
useTypeInUrl: false,
|
||||
},
|
||||
openid: {
|
||||
name: gettext('OpenID Connect Server'),
|
||||
@ -18,6 +19,7 @@ Ext.define('Proxmox.Schema', { // a singleton
|
||||
pwchange: false,
|
||||
sync: false,
|
||||
iconCls: 'pmx-itype-icon-openid-logo',
|
||||
useTypeInUrl: true,
|
||||
},
|
||||
ldap: {
|
||||
name: gettext('LDAP Server'),
|
||||
@ -28,6 +30,7 @@ Ext.define('Proxmox.Schema', { // a singleton
|
||||
tfa: true,
|
||||
pwchange: false,
|
||||
sync: true,
|
||||
useTypeInUrl: true,
|
||||
},
|
||||
ad: {
|
||||
name: gettext('Active Directory Server'),
|
||||
@ -38,6 +41,7 @@ Ext.define('Proxmox.Schema', { // a singleton
|
||||
tfa: true,
|
||||
pwchange: false,
|
||||
sync: true,
|
||||
useTypeInUrl: true,
|
||||
},
|
||||
},
|
||||
// to add or change existing for product specific ones
|
||||
|
||||
@ -11,7 +11,6 @@ Ext.define('Proxmox.panel.AuthView', {
|
||||
},
|
||||
|
||||
baseUrl: '/access/domains',
|
||||
useTypeInUrl: false,
|
||||
|
||||
columns: [
|
||||
{
|
||||
@ -45,9 +44,11 @@ Ext.define('Proxmox.panel.AuthView', {
|
||||
|
||||
openEditWindow: function(authType, realm) {
|
||||
let me = this;
|
||||
const { useTypeInUrl } = Proxmox.Schema.authDomains[authType];
|
||||
|
||||
Ext.create('Proxmox.window.AuthEditBase', {
|
||||
baseUrl: me.baseUrl,
|
||||
useTypeInUrl: me.useTypeInUrl,
|
||||
useTypeInUrl,
|
||||
authType,
|
||||
realm,
|
||||
listeners: {
|
||||
@ -123,7 +124,7 @@ Ext.define('Proxmox.panel.AuthView', {
|
||||
xtype: 'proxmoxStdRemoveButton',
|
||||
getUrl: (rec) => {
|
||||
let url = me.baseUrl;
|
||||
if (me.useTypeInUrl) {
|
||||
if (Proxmox.Schema.authDomains[rec.data.type].useTypeInUrl) {
|
||||
url += `/${rec.get('type')}`;
|
||||
}
|
||||
url += `/${rec.getId()}`;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user