* fix bug for merge rights.

This commit is contained in:
wangyidong
2016-06-01 16:12:07 +08:00
parent 841bf08e6e
commit 1a68eb4249
+2 -3
View File
@@ -688,15 +688,14 @@ class userModel extends model
break;
}
$acl = json_decode($group->acl, true);
if(empty($acl['products'])) $productAllow = true;
if(empty($acl['projects'])) $projectAllow = true;
if(empty($acls) and !empty($acl))
{
$acls = $acl;
continue;
}
if(empty($acl['products'])) $productAllow = true;
if(empty($acl['projects'])) $projectAllow = true;
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'];