* [ticket#1773,done,0.2h] filter no priv projects.

This commit is contained in:
tianshujie
2025-02-14 16:07:41 +08:00
committed by 刘梦艺
parent 28a11ae88b
commit d59ca3e828
3 changed files with 8 additions and 7 deletions
+1 -1
View File
@@ -1688,7 +1688,7 @@ class bug extends control
public function ajaxGetProjects(int $productID, string $branch = '', int $projectID = 0, string $pageType = '')
{
$product = $this->loadModel('product')->fetchByID($productID);
$projectPairs = $product->shadow ? $this->loadModel('project')->getPairs(false, 'noproduct,noclosed') : array();
$projectPairs = $product->shadow ? $this->loadModel('project')->getPairs(false, 'noproduct,noclosed,haspriv') : array();
$projects = $this->product->getProjectPairsByProduct($productID, $branch, array_keys($projectPairs));
if($this->app->getViewType() == 'json') return print(json_encode($projects));
if($pageType == 'old') return print(html::select('project', array(0 => '') + $projects, $projectID, "class='form-control' onchange='loadProductExecutions({$productID}, this.value)'"));