public function actionTaskOperation($id, $operation)
{
$task = Task::findOne($id);
if (!$task) {
static::renderJson([], -1, yii::t('task', 'unknown deployment bill'));
}
// 是否为该项目的审核管理员(超级管理员可以不用审核,如果想审核就得设置为审核管理员,要不只能维护配置)
if (!Group::isAuditAdmin($this->uid, $task->project_id)) {
throw new \Exception(yii::t('w', 'you are not master of project'));
}
$task->status = $operation ? Task::STATUS_PASS : Task::STATUS_REFUSE;
$task->save();
static::renderJson(['status' => \Yii::t('w', 'task_status_' . $task->status)]);
}