This commit is contained in:
liumengyi
2021-12-09 10:34:47 +08:00
committed by 孙广明
parent 8e7432ad08
commit f0e55ad2a4
+3 -15
View File
@@ -882,31 +882,19 @@ class actionModel extends model
}
/* If the sql not include 'product', add check purview for product. */
if(strpos($actionQuery, $allProducts) === false)
{
if(!in_array($productID, array_keys($products))) return array();
}
else
if(strpos($actionQuery, $allProducts) !== false)
{
$actionQuery = str_replace($allProducts, '1', $actionQuery);
}
/* If the sql not include 'project', add check purview for project. */
if(strpos($actionQuery, $allProjects) === false)
{
$actionQuery = $actionQuery . ' AND `project`' . helper::dbIN(array_keys($projects));
}
else
if(strpos($actionQuery, $allProjects) !== false)
{
$actionQuery = str_replace($allProjects, '1', $actionQuery);
}
/* If the sql not include 'execution', add check purview for execution. */
if(strpos($actionQuery, $allExecutions) === false)
{
$actionQuery = $actionQuery . ' AND `execution`' . helper::dbIN(array_keys($executions));
}
else
if(strpos($actionQuery, $allExecutions) !== false)
{
$actionQuery = str_replace($allExecutions, '1', $actionQuery);
}