From 352dfdc9951d42bdbf50eb0664b4e4ce259e36f6 Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Mon, 25 Sep 2017 23:35:32 +0200 Subject: [PATCH] Fixed permission issues for *SATS* --- build/api/module/machineDefault.php | 3 ++- config/modules.json | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/build/api/module/machineDefault.php b/build/api/module/machineDefault.php index bfd10f8..6aa1f4f 100755 --- a/build/api/module/machineDefault.php +++ b/build/api/module/machineDefault.php @@ -592,7 +592,8 @@ } - } + }else + $etrees = ['error' => $mc_res->error->get() ]; diff --git a/config/modules.json b/config/modules.json index 9e91599..4a252f3 100755 --- a/config/modules.json +++ b/config/modules.json @@ -275,7 +275,7 @@ "POST::getClusters": { "description": "Retourne les groupes d'une machine.", - "permissions": [["admin"]], + "permissions": [["admin"], ["sats"]], "parameters": { "id_machine": { "description": "UID de la machine.", "type": "id" } }, @@ -462,7 +462,7 @@ "POST::getModules": { "description": "Retourne les modules d'un groupe de machines", - "permissions": [["admin"]], + "permissions": [["admin"], ["sats"]], "parameters": { "id_machine_cluster": { "description": "UID du groupe de machines", "type": "id" } }, @@ -473,7 +473,7 @@ "POST::getEtrees": { "description": "Retourne les e-trees d'un groupe de machines", - "permissions": [["admin"]], + "permissions": [["admin"], ["sats"]], "parameters": { "id_machine_cluster": { "description": "UID du groupe de machines", "type": "id" } },