pve-manager/www/manager6/form/PrivilegesSelector.js
Thomas Lamprecht 3bbce3b8cd drop jslint lines
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-06-06 18:11:47 +02:00

36 lines
696 B
JavaScript

Ext.define('PVE.form.PrivilegesSelector', {
extend: 'Proxmox.form.KVComboBox',
xtype: 'pvePrivilegesSelector',
multiSelect: true,
initComponent: function() {
var me = this;
// So me.store is available.
me.callParent();
Proxmox.Utils.API2Request({
url: '/access/roles/Administrator',
method: 'GET',
success: function(response, options) {
var data = [], key;
for (key in response.result.data) {
data.push([key, key]);
}
me.store.setData(data);
me.store.sort({
property: 'key',
direction: 'ASC'
});
},
failure: function (response, opts) {
Ext.Msg.alert(gettext('Error'), response.htmlStatus);
}
});
}
});