ui: add ACL panel to Configuration

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak
2020-05-20 12:15:37 +02:00
committed by Dietmar Maurer
parent 12e3895399
commit 0542cfdf4f
4 changed files with 207 additions and 0 deletions

57
www/window/ACLEdit.js Normal file
View File

@ -0,0 +1,57 @@
Ext.define('PBS.window.ACLEdit', {
extend: 'Proxmox.window.Edit',
alias: 'widget.pbsACLAdd',
mixins: ['Proxmox.Mixin.CBind'],
url: '/access/acl',
method: 'PUT',
isAdd: true,
isCreate: true,
// caller can give a static path
path: undefined,
subject: gettext('User Permission'),
getValues: function(dirtyOnly) {
let me = this;
let values = me.callParent(arguments);
if (me.path) {
values.path = me.path;
}
return values;
},
items: [
{
xtype: 'pmxDisplayEditField',
fieldLabel: gettext('Path'),
cbind: {
editable: '{!path}',
value: '{path}',
},
name: 'path',
allowBlank: false,
},
{
xtype: 'pbsUserSelector',
fieldLabel: gettext('User'),
name: 'userid',
allowBlank: false,
},
{
xtype: 'pmxRoleSelector',
name: 'role',
value: 'NoAccess',
fieldLabel: gettext('Role'),
},
{
xtype: 'proxmoxcheckbox',
name: 'propagate',
checked: true,
uncheckedValue: 0,
fieldLabel: gettext('Propagate'),
},
],
});