* Adjust create branch rule check.

This commit is contained in:
caoyanyi
2023-11-03 16:09:42 +08:00
parent c5be2b6b3b
commit 24e8e3b6a5
3 changed files with 5 additions and 2 deletions
+3 -1
View File
@@ -47,12 +47,14 @@ detailHeader
);
/* Construct suitable actions for the current task. */
if(common::hasPriv('repo', 'createBranch') && empty($task->linkedBranch)) $hasRepo = $this->loadModel('repo')->getRepoPairs('execution', $task->execution, false);
$operateMenus = array();
foreach($config->task->view->operateList['main'] as $operate)
{
if($operate == 'createBranch')
{
if(!common::hasPriv('repo', $operate) || !empty($task->linkedBranch)) continue;
if(empty($hasRepo) || !common::hasPriv('repo', $operate) || !empty($task->linkedBranch)) continue;
}
else
{