2013-11-05 Sergio Martin <sergio.martin@artica.es>

* include/functions_tags.php: Fix the tags acl 
	check function to be compatible with acl propagation
	incident #345



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@9006 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
zarzuelo 2013-11-05 12:56:51 +00:00
parent 824962224f
commit bb4d6a9081
2 changed files with 18 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2013-11-05 Sergio Martin <sergio.martin@artica.es>
* include/functions_tags.php: Fix the tags acl
check function to be compatible with acl propagation
incident #345
2013-11-04 Sergio Martin <sergio.martin@artica.es>
* operation/tree.php: Truncate the name of agents

View File

@ -980,7 +980,18 @@ function tags_check_acl($id_user, $id_group, $access, $tags = array()) {
if($id_user === false) {
$id_user = $config['id_user'];
}
// Get parents to check in propagate ACL cases
if (!is_array($id_group) && $id_group != 0) {
$id_group = array($id_group);
$group = db_get_row_filter('tgrupo', array('id_grupo' => $id_group));
$parents = groups_get_parents($group['parent'], true);
foreach ($parents as $parent) {
$id_group[] = $parent['id_grupo'];
}
}
$acls = tags_get_acl_tags($id_user, $id_group, $access, 'data');
// If there are wrong parameters or fail ACL check, return false