[pbs-devel] applied: [PATCH v2 manager 1/2] api: Fix schema return annotation of tfa_update_auth
Wolfgang Bumiller
w.bumiller at proxmox.com
Fri Jun 23 08:02:35 CEST 2023
applied this one
On Tue, Jun 20, 2023 at 03:39:07PM +0200, Maximiliano Sandoval wrote:
> In the next commit we expose a command to list the tfa methods of a
> user. Without this annotation one would get the following error
>
> unable to format result: got unexpected data (expected null).
>
> when running the proposed cli command.
>
> Signed-off-by: Maximiliano Sandoval <m.sandoval at proxmox.com>
> ---
> src/api2/access/tfa.rs | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/src/api2/access/tfa.rs b/src/api2/access/tfa.rs
> index 4b27c0db..89d7e353 100644
> --- a/src/api2/access/tfa.rs
> +++ b/src/api2/access/tfa.rs
> @@ -56,6 +56,11 @@ async fn tfa_update_auth(
> input: {
> properties: { userid: { type: Userid } },
> },
> + returns: {
> + description: "The list of TFA entries.",
> + type: Array,
> + items: { type: methods::TypedTfaInfo }
> + },
> access: {
> permission: &Permission::Or(&[
> &Permission::Privilege(&["access", "users"], PRIV_PERMISSIONS_MODIFY, false),
> --
> 2.39.2
More information about the pbs-devel
mailing list