]> git.proxmox.com Git - proxmox-backup.git/commitdiff
gui: add permissions button to user view
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Wed, 21 Oct 2020 07:42:56 +0000 (09:42 +0200)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Thu, 29 Oct 2020 14:14:27 +0000 (15:14 +0100)
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
www/config/UserView.js

index 91e7a83ae5e5adf1b68429013f0aa1fbb561d29f..eed965145b6f6ed3d36a6c9de483351b02baed6f 100644 (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: {