gui: user: fix #2898 add dialog to set password
Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
This commit is contained in:
committed by
Dietmar Maurer
parent
d3d566f7bd
commit
16f0afbfb5
@ -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/',
|
||||
|
Reference in New Issue
Block a user