Improvements on the groups acl

This commit is contained in:
Alejandro Gallardo Escobar 2015-01-05 17:08:33 +01:00
parent d5c582f0a4
commit 70f84e2933

View File

@ -79,6 +79,9 @@ class Tree {
$parent = $this->root; $parent = $this->root;
// ACL Group // ACL Group
if (isset($this->userGroups) && $this->userGroups === false)
return array();
$group_acl = ""; $group_acl = "";
if (!empty($this->userGroups)) { if (!empty($this->userGroups)) {
$user_groups_str = implode(",", array_keys($this->userGroups)); $user_groups_str = implode(",", array_keys($this->userGroups));
@ -234,6 +237,9 @@ class Tree {
$filter['nombre'] = "%" . $this->filter['search'] . "%"; $filter['nombre'] = "%" . $this->filter['search'] . "%";
} }
// ACL groups // ACL groups
if (isset($this->userGroups) && $this->userGroups === false)
return array();
if (!empty($this->userGroups)) if (!empty($this->userGroups))
$filter['id_grupo'] = array_keys($this->userGroups); $filter['id_grupo'] = array_keys($this->userGroups);
@ -426,6 +432,9 @@ class Tree {
$parent = $this->root; $parent = $this->root;
// ACL Group // ACL Group
if (isset($this->userGroups) && $this->userGroups === false)
return array();
$group_acl = ""; $group_acl = "";
if (!empty($this->userGroups)) { if (!empty($this->userGroups)) {
$user_groups_str = implode(",", array_keys($this->userGroups)); $user_groups_str = implode(",", array_keys($this->userGroups));
@ -592,6 +601,9 @@ class Tree {
switch ($parentType) { switch ($parentType) {
case 'group': case 'group':
// ACL Groups // ACL Groups
if (isset($this->userGroups) && $this->userGroups === false)
return array();
if (!empty($this->userGroups) && !empty($parent)) { if (!empty($this->userGroups) && !empty($parent)) {
if (!isset($this->userGroups[$parent])) if (!isset($this->userGroups[$parent]))
return array(); return array();
@ -624,6 +636,9 @@ class Tree {
$parent = $this->root; $parent = $this->root;
// ACL Group // ACL Group
if (isset($this->userGroups) && $this->userGroups === false)
return array();
$group_acl = ""; $group_acl = "";
if (!empty($this->userGroups)) { if (!empty($this->userGroups)) {
$user_groups_str = implode(",", array_keys($this->userGroups)); $user_groups_str = implode(",", array_keys($this->userGroups));
@ -765,6 +780,9 @@ class Tree {
$parent = $this->root; $parent = $this->root;
// ACL Group // ACL Group
if (isset($this->userGroups) && $this->userGroups === false)
return array();
$group_acl = ""; $group_acl = "";
if (!empty($this->userGroups)) { if (!empty($this->userGroups)) {
$user_groups_str = implode(",", array_keys($this->userGroups)); $user_groups_str = implode(",", array_keys($this->userGroups));