* Adjust acls of user.

This commit is contained in:
daitingting
2018-05-31 14:27:24 +08:00
parent 6ec03cae6f
commit 2b984e6630
+4 -3
View File
@@ -751,6 +751,7 @@ class userModel extends model
$viewAllow = true;
break;
}
if(empty($acl['products'])) $productAllow = true;
if(empty($acl['projects'])) $projectAllow = true;
if(empty($acl['views'])) $viewAllow = true;
@@ -765,9 +766,9 @@ class userModel extends model
if(!empty($acl['projects'])) $acls['projects'] = !empty($acls['projects']) ? array_merge($acls['projects'], $acl['projects']) : $acl['projects'];
}
if($productAllow) $acls['products'] = array();
if($projectAllow) $acls['projects'] = array();
if($viewAllow) $acls['views'] = array();
if($productAllow && empty($acls['products'])) $acls['products'] = array();
if($projectAllow && empty($acls['projects'])) $acls['projects'] = array();
if($viewAllow && empty($acl['views'])) $acls['views'] = array();
$sql = $this->dao->select('module, method')->from(TABLE_USERGROUP)->alias('t1')->leftJoin(TABLE_GROUPPRIV)->alias('t2')
->on('t1.group = t2.group')