Skip to content

Commit

Permalink
fix: 任务有负责人后仅限项目或任务负责人修改
Browse files Browse the repository at this point in the history
  • Loading branch information
kuaifan committed Dec 30, 2021
1 parent 502dd1e commit 57edf38
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions app/Http/Controllers/Api/ProjectController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 57edf38

Please sign in to comment.