* Move code.

This commit is contained in:
liumengyi
2024-04-30 15:23:19 +08:00
parent b0435c780f
commit 509c92b40e
+5 -4
View File
@@ -223,15 +223,16 @@ class executionModel extends model
$execution = $this->dao->findByID($executionID)->from(TABLE_EXECUTION)->fetch();
if(empty($execution)) return $this->app->control->sendError($this->lang->notFound, helper::createLink('execution', 'all'));
if(!$this->app->user->admin && strpos(",{$this->app->user->view->sprints},", ",{$executionID},") === false) $this->accessDenied();
/* Parent stage can't access. */
$childExecutions = $this->getChildExecutions($executionID);
if(!empty($childExecutions) && $execution->type == 'stage') return $this->app->control->sendError($this->lang->execution->errorParentExecution, helper::createLink('execution', 'all'));
}
$executionID = key($executions);
}
/* Parent stage can't access. */
$execution = $this->dao->findByID($executionID)->from(TABLE_EXECUTION)->fetch();
$childExecutions = $this->getChildExecutions($executionID);
if(!empty($childExecutions) && $execution->type == 'stage') return $this->app->control->sendError($this->lang->execution->errorParentExecution, helper::createLink('execution', 'all'));
/* Save session. */
$this->executionTao->saveSession((int)$executionID);