From 57edf38c1a763df6ceab0b98222877e0b42eb484 Mon Sep 17 00:00:00 2001 From: kuaifan Date: Thu, 30 Dec 2021 15:28:25 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BB=BB=E5=8A=A1=E6=9C=89=E8=B4=9F?= =?UTF-8?q?=E8=B4=A3=E4=BA=BA=E5=90=8E=E4=BB=85=E9=99=90=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E6=88=96=E4=BB=BB=E5=8A=A1=E8=B4=9F=E8=B4=A3=E4=BA=BA=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Controllers/Api/ProjectController.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/Api/ProjectController.php b/app/Http/Controllers/Api/ProjectController.php index d6434c504..1cc52ebf1 100755 --- a/app/Http/Controllers/Api/ProjectController.php +++ b/app/Http/Controllers/Api/ProjectController.php @@ -908,8 +908,12 @@ public function task__update() $task_id = intval($data['task_id']); // $task = ProjectTask::userTask($task_id, [], true, $project); - if (!$task->isOwnerParent() && !$project->owner) { - return Base::retError('仅限项目或任务负责人修改'); + // + if (count($task->taskUser->where('owner', 1)) > 0) { + // 任务有负责人后仅限项目或任务负责人修改 + if (!$task->isOwnerParent() && !$project->owner) { + return Base::retError('仅限项目或任务负责人修改'); + } } // $updateComplete = false;