[pve-devel] [PATCH access-control v2 1/3] domain sync: make options actually required
Thomas Lamprecht
t.lamprecht at proxmox.com
Sat Apr 25 19:08:12 CEST 2020
On 4/23/20 8:47 AM, Dominik Csapak wrote:
> we want the api options to be optional, but only as long as there are
> default values set in the realm config
>
> since they are all marked as optional (else they would be required in
> the api) this check did not work as intended
>
> instead, set the result to the value of:
> * the parameter
> * the set default in the config
> * the api default
> in this order
>
> if it is undef after this, raise a parameter exception
>
> Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
> ---
> changes from v1:
> * better structure code to see the precedence of parameters
>
> PVE/API2/Domains.pm | 15 ++++++---------
> 1 file changed, 6 insertions(+), 9 deletions(-)
>
applied series, small opinionated code cleanup for 1/3 and one a bit more
changing for 3/3 - but nothing big, thus just pushed as followup.
Thanks!
More information about the pve-devel
mailing list