[pve-devel] [PATCH v3 pve-manager 59/66] ui: perm path: load notification target/filter acl entries

Lukas Wagner l.wagner at proxmox.com
Thu Jul 20 09:46:51 CEST 2023



On 7/19/23 14:53, Dominik Csapak wrote:
> On 7/17/23 17:00, Lukas Wagner wrote:
>> Signed-off-by: Lukas Wagner <l.wagner at proxmox.com>
>> ---
>>
>> Notes:
>>      I'm not sure if I like this solution, but adding notification targets to
>>      the resources API endpoint would not have make sense.
>>      Maybe we could create a new API endpoint that returns all possible ACL
>>      paths and then use a normal store for the perm path combobox?
> 
> i'd also prefer that, it would make this much simpler, and more manageable
> for the pci/usb mappings i simply omitted them here, so for now
> we could simply hardcode the different types here
> 
> /mapping/usb
> /mapping/pci
> /mapping/notification
> 
> and be done with it until we have said api call ;)

I guess that's a good compromise for now. If any user needs the per-endpoint permissions
in the meanwhile, they could just use the CLI to set it.
I'll also put the 'enumerate ACL paths' API call on my task backlog.

> 
> AFAIR thomas opposed it the last time i wanted to add an api call here
> (i can't remember what for though)
> 
>>
>>   www/manager6/data/PermPathStore.js | 26 +++++++++++++++++++++++++-
>>   1 file changed, 25 insertions(+), 1 deletion(-)
>>
>> diff --git a/www/manager6/data/PermPathStore.js b/www/manager6/data/PermPathStore.js
>> index c3ac7f0e..b7e4fa33 100644
>> --- a/www/manager6/data/PermPathStore.js
>> +++ b/www/manager6/data/PermPathStore.js
>> @@ -9,6 +9,7 @@ Ext.define('PVE.data.PermPathStore', {
>>       { 'value': '/access/groups' },
>>       { 'value': '/access/realm' },
>>       { 'value': '/mapping' },
>> +    { 'value': '/mapping/notification' },
>>       { 'value': '/nodes' },
>>       { 'value': '/pool' },
>>       { 'value': '/sdn/zones' },
>> @@ -46,8 +47,31 @@ Ext.define('PVE.data.PermPathStore', {
>>           donePaths[path] = 1;
>>           }
>>       });
>> -    me.resumeEvents();
>> +    Ext.Ajax.request({
> 
> also why ext.ajax.request and not API2Request ? ;)
> 

Good question, there is no good reason.
I'm not sure where I copied that from :D. Thanks for the hint!

-- 
- Lukas





More information about the pve-devel mailing list