public inbox for pve-devel@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

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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal