From 1a68eb42496fafc87ef158494002da340429845a Mon Sep 17 00:00:00 2001 From: wangyidong Date: Wed, 1 Jun 2016 16:12:07 +0800 Subject: [PATCH] * fix bug for merge rights. --- module/user/model.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/module/user/model.php b/module/user/model.php index 88e7ba89af..afe637f5f9 100644 --- a/module/user/model.php +++ b/module/user/model.php @@ -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'];