Skip to content

Commit

Permalink
set the same labels
Browse files Browse the repository at this point in the history
  • Loading branch information
lxerxa committed Aug 19, 2021
1 parent a1b9311 commit 518e7d0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/Http/Controllers/IssueController.php
Original file line number Diff line number Diff line change
Expand Up @@ -766,6 +766,10 @@ public function setLabels(Request $request, $project_key, $id)
throw new \UnexpectedValueException('the issue does not exist or is not in the project.', -11103);
}

if ($issue['labels'] == $labels) {
return $this->show($project_key, $id);
}

if (!$this->isPermissionAllowed($project_key, 'edit_issue') && !($this->isPermissionAllowed($project_key, 'edit_self_issue') && $issue['reporter']['id'] == $this->user->id))
{
return Response()->json(['ecode' => -10002, 'emsg' => 'permission denied.']);
Expand Down

0 comments on commit 518e7d0

Please sign in to comment.