This commit is contained in:
王怡栋
2022-01-21 10:40:23 +08:00
3 changed files with 12 additions and 2 deletions
@@ -0,0 +1,6 @@
<script>
$(function()
{
$('#submit').parent().append('<input type="hidden" name="vision" id="vision" value="lite">');
});
</script>
+3 -1
View File
@@ -694,7 +694,9 @@ class baseRouter
public function setVision()
{
$account = isset($_SESSION['user']) ? $_SESSION['user']->account : '';
$vision = $this->dbh->query("SELECT * FROM " . TABLE_CONFIG . " WHERE owner = '$account' AND `key` = 'vision' LIMIT 1")->fetch();
if($this->config->installed) $vision = $this->dbh->query("SELECT * FROM " . TABLE_CONFIG . " WHERE owner = '$account' AND `key` = 'vision' LIMIT 1")->fetch();
$this->config->vision = $vision ? $vision->value : 'rnd';
}
+3 -1
View File
@@ -931,6 +931,7 @@ class userModel extends model
$groups = $this->dao->select('t1.acl, t1.project')->from(TABLE_GROUP)->alias('t1')
->leftJoin(TABLE_USERGROUP)->alias('t2')->on('t1.id=t2.`group`')
->where('t2.account')->eq($account)
->andWhere('t1.vision')->eq($this->config->vision)
->andWhere('t1.role')->ne('projectAdmin')
->andWhere('t1.role')->ne('limited')
->fetchAll();
@@ -991,7 +992,8 @@ class userModel extends model
->leftJoin(TABLE_USERGROUP)->alias('t2')->on('t1.id = t2.`group`')
->leftJoin(TABLE_GROUPPRIV)->alias('t3')->on('t2.`group` = t3.`group`')
->where('t2.account')->eq($account)
->andWhere('t1.project')->eq(0);
->andWhere('t1.project')->eq(0)
->andWhere('t1.vision')->eq($this->config->vision);
}
$stmt = $sql->query();