| @@ 581-590 (lines=10) @@ | ||
| 578 | $userId = $this->userSession->getUser()->getUID(); |
|
| 579 | $user = $this->userManager->get($id); |
|
| 580 | ||
| 581 | if ($userId === $id) { |
|
| 582 | return new DataResponse( |
|
| 583 | [ |
|
| 584 | 'status' => 'error', |
|
| 585 | 'data' => [ |
|
| 586 | 'message' => $errorMsgGeneral |
|
| 587 | ] |
|
| 588 | ], Http::STATUS_FORBIDDEN |
|
| 589 | ); |
|
| 590 | } |
|
| 591 | ||
| 592 | if ($user) { |
|
| 593 | if (!$this->isAdmin && !$this->groupManager->getSubAdmin()->isUserAccessible($this->userSession->getUser(), $user)) { |
|
| @@ 615-625 (lines=11) @@ | ||
| 612 | ] |
|
| 613 | ] |
|
| 614 | ); |
|
| 615 | } else { |
|
| 616 | return new DataResponse( |
|
| 617 | [ |
|
| 618 | 'status' => 'error', |
|
| 619 | 'data' => [ |
|
| 620 | 'message' => $errorMsgGeneral |
|
| 621 | ] |
|
| 622 | ], |
|
| 623 | Http::STATUS_FORBIDDEN |
|
| 624 | ); |
|
| 625 | } |
|
| 626 | ||
| 627 | } |
|
| 628 | ||