[icinga-checkins] icinga.org: icinga2/feature/gc: Fix missing permissions and update the documentation
git at icinga.org
git at icinga.org
Fri Aug 19 08:10:01 CEST 2016
Module: icinga2
Branch: feature/gc
Commit: 8e5961f217742a035aff3b42d122252040c881a8
URL: https://git.icinga.org/?p=icinga2.git;a=commit;h=8e5961f217742a035aff3b42d122252040c881a8
Author: Gunnar Beutner <gunnar.beutner at netways.de>
Date: Thu Aug 18 19:00:14 2016 +0200
Fix missing permissions and update the documentation
fixes #12483
---
doc/12-icinga2-api.md | 7 +++++--
lib/remote/typequeryhandler.cpp | 1 +
lib/remote/variablequeryhandler.cpp | 1 +
3 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/doc/12-icinga2-api.md b/doc/12-icinga2-api.md
index 8c29b55..9f18a2d 100644
--- a/doc/12-icinga2-api.md
+++ b/doc/12-icinga2-api.md
@@ -203,13 +203,16 @@ Available permissions for specific URL endpoints:
actions/<action> | /v1/actions | Yes
config/query | /v1/config | No
config/modify | /v1/config | No
+ console | /v1/console | No
+ events/<type> | /v1/events | No
objects/query/<type> | /v1/objects | Yes
objects/create/<type> | /v1/objects | No
objects/modify/<type> | /v1/objects | Yes
objects/delete/<type> | /v1/objects | Yes
status/query | /v1/status | Yes
- events/<type> | /v1/events | No
- console | /v1/console | No
+ templates/<type> | /v1/templates | Yes
+ types | /v1/types | Yes
+ variables | /v1/variables | Yes
The required actions or types can be replaced by using a wildcard match ("\*").
diff --git a/lib/remote/typequeryhandler.cpp b/lib/remote/typequeryhandler.cpp
index b93d67f..c76cc32 100644
--- a/lib/remote/typequeryhandler.cpp
+++ b/lib/remote/typequeryhandler.cpp
@@ -74,6 +74,7 @@ bool TypeQueryHandler::HandleRequest(const ApiUser::Ptr& user, HttpRequest& requ
QueryDescription qd;
qd.Types.insert("Type");
+ qd.Permission = "types";
qd.Provider = new TypeTargetProvider();
if (params->Contains("type"))
diff --git a/lib/remote/variablequeryhandler.cpp b/lib/remote/variablequeryhandler.cpp
index 33888b6..37409ec 100644
--- a/lib/remote/variablequeryhandler.cpp
+++ b/lib/remote/variablequeryhandler.cpp
@@ -83,6 +83,7 @@ bool VariableQueryHandler::HandleRequest(const ApiUser::Ptr& user, HttpRequest&
QueryDescription qd;
qd.Types.insert("Variable");
+ qd.Permission = "variables";
qd.Provider = new VariableTargetProvider();
params->Set("type", "Variable");
More information about the icinga-checkins
mailing list