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

Dominik Csapak d.csapak at proxmox.com
Wed Oct 23 13:56:06 CEST 2019


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;
 };
-- 
2.20.1




More information about the pmg-devel mailing list