@@ 189-192 (lines=4) @@ | ||
186 | if (!$project) { |
|
187 | throw new \UnexpectedValueException('the project does not exist.', -14006); |
|
188 | } |
|
189 | if ($project->principal['id'] !== $this->user->id && !$this->user->hasAccess('sys_admin')) { |
|
190 | return response()->json(['ecode' => -10002, 'emsg' => 'permission denied.']); |
|
191 | } |
|
192 | ||
193 | Schema::collection( |
|
194 | 'issue_' . $project->key, function ($col) { |
|
195 | $col->index('type'); |
|
@@ 592-595 (lines=4) @@ | ||
589 | if (!$project) { |
|
590 | throw new \UnexpectedValueException('the project does not exist.', -14004); |
|
591 | } |
|
592 | if ($project->principal['id'] !== $this->user->id && !$this->user->hasAccess('sys_admin')) { |
|
593 | return response()->json(['ecode' => -10002, 'emsg' => 'permission denied.']); |
|
594 | } |
|
595 | ||
596 | $old_principal = $project->principal; |
|
597 | $project->fill($updValues)->save(); |
|
598 |