From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <d.csapak@proxmox.com>
Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits))
 (No client certificate requested)
 by lists.proxmox.com (Postfix) with ESMTPS id 1F1D4EC96
 for <pve-devel@lists.proxmox.com>; Thu, 20 Jul 2023 09:54:25 +0200 (CEST)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
 by firstgate.proxmox.com (Proxmox) with ESMTP id 00827F965
 for <pve-devel@lists.proxmox.com>; Thu, 20 Jul 2023 09:54:25 +0200 (CEST)
Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com
 [94.136.29.106])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits))
 (No client certificate requested)
 by firstgate.proxmox.com (Proxmox) with ESMTPS
 for <pve-devel@lists.proxmox.com>; Thu, 20 Jul 2023 09:54:24 +0200 (CEST)
Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1])
 by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 34A3941A27;
 Thu, 20 Jul 2023 09:54:24 +0200 (CEST)
Message-ID: <a693c585-bf31-c1dd-61b8-3d5084a40db9@proxmox.com>
Date: Thu, 20 Jul 2023 09:54:23 +0200
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
To: Lukas Wagner <l.wagner@proxmox.com>,
 Proxmox VE development discussion <pve-devel@lists.proxmox.com>
References: <20230717150051.710464-1-l.wagner@proxmox.com>
 <20230717150051.710464-60-l.wagner@proxmox.com>
 <dfc4b60a-053c-0af6-940f-ee85924806de@proxmox.com>
 <6aa1cefb-26a4-4950-8e24-b43e6cc05854@proxmox.com>
Content-Language: en-US
From: Dominik Csapak <d.csapak@proxmox.com>
In-Reply-To: <6aa1cefb-26a4-4950-8e24-b43e6cc05854@proxmox.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-SPAM-LEVEL: Spam detection results:  0
 AWL -0.134 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DMARC_MISSING             0.1 Missing DMARC policy
 KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment
 POISEN_SPAM_PILL          0.1 Meta: its spam
 POISEN_SPAM_PILL_1        0.1 random spam to be learned in bayes
 POISEN_SPAM_PILL_3        0.1 random spam to be learned in bayes
 SPF_HELO_NONE           0.001 SPF: HELO does not publish an SPF Record
 SPF_PASS               -0.001 SPF: sender matches SPF record
 T_SCC_BODY_TEXT_LINE    -0.01 -
Subject: Re: [pve-devel] [PATCH v3 pve-manager 59/66] ui: perm path: load
 notification target/filter acl entries
X-BeenThere: pve-devel@lists.proxmox.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Proxmox VE development discussion <pve-devel.lists.proxmox.com>
List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=unsubscribe>
List-Archive: <http://lists.proxmox.com/pipermail/pve-devel/>
List-Post: <mailto:pve-devel@lists.proxmox.com>
List-Help: <mailto:pve-devel-request@lists.proxmox.com?subject=help>
List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=subscribe>
X-List-Received-Date: Thu, 20 Jul 2023 07:54:25 -0000

On 7/20/23 09:46, Lukas Wagner wrote:
> 
> 
> 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@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.
> 

i'ts even easier, the user can simply edit the field manually ;)
i know this trips up many people, but we often have dropdown fields
that are actually manually editable (like the permpathselector)
but it's only hinted at by the blinking cursor in the field.

we should come up with a more apparent way of making that clear...
(but i currently can't think of one)

>>
>> 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!
>