[icinga-checkins] icinga.org: icinga-web/cdoebler/default: * static content: added access control to queries

git at icinga.org git at icinga.org
Fri Jan 22 10:37:11 CET 2010


Module: icinga-web
Branch: cdoebler/default
Commit: d407f0902ea87938fd1a0f5df5d9848cc265ef83
URL:    https://git.icinga.org/?p=icinga-web.git;a=commit;h=d407f0902ea87938fd1a0f5df5d9848cc265ef83

Author: Christian Doebler <christian.doebler at netways.de>
Date:   Fri Jan 22 10:36:55 2010 +0100

* static content: added access control to queries

---

 .../models/System/StaticContentModel.class.php     |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/app/modules/Cronks/models/System/StaticContentModel.class.php b/app/modules/Cronks/models/System/StaticContentModel.class.php
index 7e9bc90..26419af 100644
--- a/app/modules/Cronks/models/System/StaticContentModel.class.php
+++ b/app/modules/Cronks/models/System/StaticContentModel.class.php
@@ -219,6 +219,19 @@ class Cronks_System_StaticContentModel extends ICINGACronksBaseModel
 
 				// execute query and fetch result
 				if ($success) {
+					// add access control to query
+					$secureSearchModels = array(
+						'IcingaHostgroup',
+						'IcingaServicegroup',
+						'IcingaHostCustomVariablePair',
+						'IcingaServiceCustomVariablePair'
+					);
+					IcingaPrincipalTargetTool::applyApiSecurityPrincipals(
+						$secureSearchModels,
+						$apiSearch
+					);
+
+					// fetch data
 					$apiRes = $apiSearch->fetch()->getAll();
 
 					// set function





More information about the icinga-checkins mailing list