gui: add permissions button to user view

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
Fabian Grünbichler 2020-10-21 09:42:56 +02:00 committed by Wolfgang Bumiller
parent 4615325f9e
commit e6b5bf69a3

View File

@ -63,6 +63,19 @@ Ext.define('PBS.config.UserView', {
}).show();
},
showPermissions: function() {
let me = this;
let view = me.getView();
let selection = view.getSelection();
if (selection.length < 1) return;
Ext.create('Proxmox.PermissionView', {
auth_id: selection[0].data.userid,
auth_id_name: 'auth_id',
}).show();
},
renderUsername: function(userid) {
return Ext.String.htmlEncode(userid.match(/^(.+)@([^@]+)$/)[1]);
},
@ -122,6 +135,12 @@ Ext.define('PBS.config.UserView', {
enableFn: (rec) => rec.data.userid !== 'root@pam',
callback: 'reload',
},
{
xtype: 'proxmoxButton',
text: gettext('Permissions'),
handler: 'showPermissions',
disabled: true,
},
],
viewConfig: {