2020-05-20 10:15:37 +00:00
|
|
|
Ext.define('PBS.window.ACLEdit', {
|
|
|
|
extend: 'Proxmox.window.Edit',
|
|
|
|
alias: 'widget.pbsACLAdd',
|
|
|
|
mixins: ['Proxmox.Mixin.CBind'],
|
|
|
|
|
2020-09-21 11:25:48 +00:00
|
|
|
onlineHelp: 'user_acl',
|
|
|
|
|
2020-05-20 10:15:37 +00:00
|
|
|
url: '/access/acl',
|
|
|
|
method: 'PUT',
|
|
|
|
isAdd: true,
|
|
|
|
isCreate: true,
|
2020-07-25 18:10:06 +00:00
|
|
|
width: 450,
|
2020-05-20 10:15:37 +00:00
|
|
|
|
|
|
|
// 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: [
|
|
|
|
{
|
2020-07-25 18:10:06 +00:00
|
|
|
xtype: 'pbsPermissionPathSelector',
|
2020-05-20 10:15:37 +00:00
|
|
|
fieldLabel: gettext('Path'),
|
|
|
|
cbind: {
|
|
|
|
editable: '{!path}',
|
|
|
|
value: '{path}',
|
|
|
|
},
|
|
|
|
name: 'path',
|
|
|
|
allowBlank: false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
xtype: 'pbsUserSelector',
|
|
|
|
fieldLabel: gettext('User'),
|
2020-10-23 11:33:21 +00:00
|
|
|
name: 'auth_id',
|
2020-05-20 10:15:37 +00:00
|
|
|
allowBlank: false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
xtype: 'pmxRoleSelector',
|
|
|
|
name: 'role',
|
|
|
|
value: 'NoAccess',
|
|
|
|
fieldLabel: gettext('Role'),
|
|
|
|
},
|
|
|
|
{
|
|
|
|
xtype: 'proxmoxcheckbox',
|
|
|
|
name: 'propagate',
|
|
|
|
checked: true,
|
|
|
|
uncheckedValue: 0,
|
|
|
|
fieldLabel: gettext('Propagate'),
|
|
|
|
},
|
|
|
|
],
|
|
|
|
});
|