[pmg-devel] [PATCH pmg-api 1/1] API: Actions: also return if action is editable

Stoiko Ivanov s.ivanov at proxmox.com
Wed Oct 23 19:06:29 CEST 2019


Thanks for the patches!

checked the code (learned about oisedit) - looks good to me!

applied both locally - tested them - works as advertised!

for both patches:
Reviewed-By: Stoiko Ivanov <s.ivanov at proxmox.com>
Tested-By: Stoiko Ivanov <s.ivanov at proxmox.com>


On Wed, 23 Oct 2019 13:56:06 +0200
Dominik Csapak <d.csapak at proxmox.com> wrote:

> we can use this in the gui to set the state of the edit/remove buttons
> 
> Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
> ---
>  src/PMG/API2/Action.pm | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/src/PMG/API2/Action.pm b/src/PMG/API2/Action.pm
> index 7dd225d..a71f27d 100644
> --- a/src/PMG/API2/Action.pm
> +++ b/src/PMG/API2/Action.pm
> @@ -31,6 +31,7 @@ my $format_action_object = sub {
>      $data->{id} = "$data->{ogroup}_$data->{id}";
>      $data->{name} = $og->{name};
>      $data->{info} = $og->{info};
> +    $data->{editable} = $action->oisedit();
>  
>      return $data;
>  };




More information about the pmg-devel mailing list