]> git.proxmox.com Git - proxmox-backup.git/blobdiff - www/config/UserView.js
gui: user: fix #2898 add dialog to set password
[proxmox-backup.git] / www / config / UserView.js
index 7a869d44cf0b5726493fe9cd82b50eabe14f0b9a..91e7a83ae5e5adf1b68429013f0aa1fbb561d29f 100644 (file)
@@ -51,6 +51,18 @@ Ext.define('PBS.config.UserView', {
             }).show();
        },
 
+       setPassword: function() {
+           let me = this;
+           let view = me.getView();
+           let selection = view.getSelection();
+
+           if (selection.length < 1) return;
+
+           Ext.create('PBS.window.UserPassword', {
+               url: '/api2/extjs/access/users/' + selection[0].data.userid,
+           }).show();
+       },
+
        renderUsername: function(userid) {
            return Ext.String.htmlEncode(userid.match(/^(.+)@([^@]+)$/)[1]);
        },
@@ -98,6 +110,12 @@ Ext.define('PBS.config.UserView', {
            handler: 'editUser',
            disabled: true,
        },
+       {
+           xtype: 'proxmoxButton',
+           text: gettext('Password'),
+           handler: 'setPassword',
+           disabled: true,
+       },
        {
            xtype: 'proxmoxStdRemoveButton',
            baseurl: '/access/users/',