From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <f.gruenbichler@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) server-digest SHA256)
 (No client certificate requested)
 by lists.proxmox.com (Postfix) with ESMTPS id 842DFBE9CE
 for <pve-devel@lists.proxmox.com>; Tue,  2 Apr 2024 09:28:29 +0200 (CEST)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
 by firstgate.proxmox.com (Proxmox) with ESMTP id 51AB41EF59
 for <pve-devel@lists.proxmox.com>; Tue,  2 Apr 2024 09:27:59 +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) server-digest SHA256)
 (No client certificate requested)
 by firstgate.proxmox.com (Proxmox) with ESMTPS
 for <pve-devel@lists.proxmox.com>; Tue,  2 Apr 2024 09:27:58 +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 0A41C447F1;
 Tue,  2 Apr 2024 09:27:58 +0200 (CEST)
Date: Tue, 2 Apr 2024 09:27:57 +0200 (CEST)
From: =?UTF-8?Q?Fabian_Gr=C3=BCnbichler?= <f.gruenbichler@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Cc: Jona Draaijer <jcdra1@gmail.com>,
 Wolfgang Bumiller <w.bumiller@proxmox.com>
Message-ID: <491134625.3322.1712042877345@webmail.proxmox.com>
In-Reply-To: <mailman.784.1712001709.434.pve-devel@lists.proxmox.com>
References: <mailman.784.1712001709.434.pve-devel@lists.proxmox.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Priority: 3
Importance: Normal
X-Mailer: Open-Xchange Mailer v7.10.6-Rev61
X-Originating-Client: open-xchange-appsuite
X-SPAM-LEVEL: Spam detection results:  0
 AWL 0.009 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_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
Subject: Re: [pve-devel] GET /access/users/{userid} has parameter 'tokens'
 with 'additionalProperties' containing object definition
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: Tue, 02 Apr 2024 07:28:29 -0000


> Jona Draaijer via pve-devel <pve-devel@lists.proxmox.com> hat am 01.04.2024 22:00 CEST geschrieben:
> Hi,
> 
> As per the title, that endpoint has an additionalProperties value that is
> not a bool, but rather an object definition. (It's defined in
> pve-access-control/src/PVE/API2/User.pm).
> 
> As far as I can tell, all other 'additionalProperties' are bools. Does
> anyone know why this specific one is different, or if this difference is
> intentional?

I think this was just an accident.

> From the looks of it it seems like it's used as a "we need this standard
> option, but also have to make it optional". I am still quite new to perl,
> so I don't know if there is a way to do what was intended.

My guess is the intent was to have

	    tokens => get_standard_option('token-info', { optional => 1 }),

instead, @Wolfgang?