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

* include/functions_groups.php: Fixed function that
	returns the user groups in tree way. It was broken
	when the user has acls over a group but not in his
	father. Incident: #342
	Merged from 4.1



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8997 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
zarzuelo 2013-11-04 11:30:24 +00:00
parent ea486a6934
commit 273d72b050
2 changed files with 15 additions and 0 deletions

View File

@ -1,3 +1,11 @@
2013-11-04 Sergio Martin <sergio.martin@artica.es>
* include/functions_groups.php: Fixed function that
returns the user groups in tree way. It was broken
when the user has acls over a group but not in his
father. Incident: #342
Merged from 4.1
2013-10-31 Hirofumi Kosaka <kosaka@rworks.jp>
* include/functions_api.php: Added some parameters to

View File

@ -494,6 +494,13 @@ function groups_get_groups_tree_recursive($groups, $trash = 0, $trash2 = 0) {
if ($group['id_grupo'] == 0) {
continue;
}
// If the user has ACLs on a gruop but not in his father,
// we consider it as a son of group "all"
if(!in_array($group['parent'], array_keys($groups))) {
$group['parent'] = 0;
}
$tree[$group['parent']]['hash_branch'] = 1;
$tree[$group['parent']]['branch'][$key] = &$tree[$key];