* finish task #2371.

This commit is contained in:
wangyidong
2015-10-14 11:11:52 +08:00
parent c5546d215e
commit 9ec0520b34
6 changed files with 51 additions and 26 deletions

View File

@@ -639,7 +639,7 @@ class userModel extends model
break;
}
$acl = json_decode($group->acl, true);
if(empty($acls))
if(empty($acls) and !empty($acl))
{
$acls = $acl;
continue;
@@ -648,7 +648,7 @@ class userModel extends model
if(empty($acl['products'])) $productAllow = true;
if(empty($acl['projects'])) $projectAllow = true;
$acls['views'] = array_merge($acls['views'], $acl['views']);
if(!empty($acl['views'])) $acls['views'] = array_merge($acls['views'], $acl['views']);
if(!empty($acl['products'])) $acls['products'] = !empty($acls['products']) ? array_merge($acls['products'], $acl['products']) : $acl['products'];
if(!empty($acl['projects'])) $acls['projects'] = !empty($acls['projects']) ? array_merge($acls['projects'], $acl['projects']) : $acl['projects'];
}