public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Wolfgang Bumiller <w.bumiller@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH access-control] api: get user: declare token schema
Date: Mon, 21 Mar 2022 15:29:12 +0100	[thread overview]
Message-ID: <20220321142912.160376-1-w.bumiller@proxmox.com> (raw)

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





             reply	other threads:[~2022-03-21 14:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-21 14:29 Wolfgang Bumiller [this message]
2022-03-21 15:12 ` [pve-devel] applied: " Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220321142912.160376-1-w.bumiller@proxmox.com \
    --to=w.bumiller@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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