all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH access-control] api: get user: declare token schema
@ 2022-03-21 14:29 Wolfgang Bumiller
  2022-03-21 15:12 ` [pve-devel] applied: " Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages in thread
From: Wolfgang Bumiller @ 2022-03-21 14:29 UTC (permalink / raw)
  To: pve-devel

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
---
The tokens are a mapping from tokenid to the token data, so let's
include this in the output specification.

We don't really make use of additionalProperties like this yet but it
*is* supported in PVE::JSONSchema, and it's the only way to clarify what
this is supposed to be.

 src/PVE/API2/User.pm | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/PVE/API2/User.pm b/src/PVE/API2/User.pm
index 244264e..49d42d3 100644
--- a/src/PVE/API2/User.pm
+++ b/src/PVE/API2/User.pm
@@ -323,6 +323,7 @@ __PACKAGE__->register_method ({
 	    tokens => {
 		optional => 1,
 		type => 'object',
+		additionalProperties => get_standard_option('token-info'),
 	    },
 	},
 	type => "object"
-- 
2.30.2





^ permalink raw reply	[flat|nested] 2+ messages in thread

* [pve-devel] applied: [PATCH access-control] api: get user: declare token schema
  2022-03-21 14:29 [pve-devel] [PATCH access-control] api: get user: declare token schema Wolfgang Bumiller
@ 2022-03-21 15:12 ` Thomas Lamprecht
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2022-03-21 15:12 UTC (permalink / raw)
  To: Proxmox VE development discussion, Wolfgang Bumiller

On 21.03.22 15:29, Wolfgang Bumiller wrote:
> Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
> ---
> The tokens are a mapping from tokenid to the token data, so let's
> include this in the output specification.
> 
> We don't really make use of additionalProperties like this yet but it
> *is* supported in PVE::JSONSchema, and it's the only way to clarify what
> this is supposed to be.
> 
>  src/PVE/API2/User.pm | 1 +
>  1 file changed, 1 insertion(+)
> 
>

applied, thanks!




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-03-21 15:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-21 14:29 [pve-devel] [PATCH access-control] api: get user: declare token schema Wolfgang Bumiller
2022-03-21 15:12 ` [pve-devel] applied: " Thomas Lamprecht

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal