Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

Commit

Permalink
#3793 centreonACL.class.php : host groups related to ACL are now take…
Browse files Browse the repository at this point in the history
…n from centreon instead of centreon_storage
  • Loading branch information
bsauveton committed Sep 28, 2015
1 parent e2ccac3 commit 105b685
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions www/class/centreonACL.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1728,10 +1728,11 @@ public function getHostHostGroupAclConf($hg_id, $broker = null, $options = null)
$searchSTR = " hg_id = '".CentreonDB::escape($hg_id)."' AND ";
# Cant manage empty hostgroup with ACLs. We'll have a problem with acl for conf...
$groupIds = array_keys($this->accessGroups);
$query = " SELECT " . $request['fields'] . " FROM hostgroup, hostgroup_relation, $db_name_acl.centreon_acl" .
" WHERE $searchSTR hostgroup_relation.hostgroup_hg_id = hostgroup.hg_id " .
" AND $db_name_acl.centreon_acl.group_id IN (" . implode(',', $groupIds) . ") " .
" AND $db_name_acl.centreon_acl.host_id = hostgroup_relation.host_host_id " .
$query = " SELECT " . $request['fields'] . " FROM hostgroup, acl_res_group_relations, " .
" acl_resources_hg_relations " .
" WHERE $searchSTR acl_res_group_relations.acl_group_id IN (" . implode(',', $groupIds) . ") " .
" AND acl_res_group_relations.acl_res_id = acl_resources_hg_relations.acl_res_id " .
" AND acl_resources_hg_relations.hg_hg_id = hostgroup.hg_id " .
$request['order'];
}
$res = $pearDB->query($query);
Expand Down

0 comments on commit 105b685

Please sign in to comment.