FIx stable21 difference

Signed-off-by: Joas Schilling <coding@schilljs.com>
pull/26815/head
Joas Schilling 5 years ago
parent 5975a68033
commit ca8b2a6b5e
No known key found for this signature in database
GPG Key ID: 7076EA9751AACDDA
  1. 7
      apps/provisioning_api/lib/Controller/UsersController.php

@ -71,6 +71,7 @@ use OCP\L10N\IFactory;
use OCP\Security\ISecureRandom;
use OCP\Security\Events\GenerateSecurePasswordEvent;
use OCP\EventDispatcher\IEventDispatcher;
use OCP\User\Backend\ISetDisplayNameBackend;
class UsersController extends AUserData {
@ -533,7 +534,7 @@ class UsersController extends AUserData {
public function getEditableFields(?string $userId = null): DataResponse {
$currentLoggedInUser = $this->userSession->getUser();
if (!$currentLoggedInUser instanceof IUser) {
throw new OCSException('', OCSController::RESPOND_NOT_FOUND);
throw new OCSException('', \OCP\API::RESPOND_NOT_FOUND);
}
$permittedFields = [];
@ -541,13 +542,13 @@ class UsersController extends AUserData {
if ($userId !== $currentLoggedInUser->getUID()) {
$targetUser = $this->userManager->get($userId);
if (!$targetUser instanceof IUser) {
throw new OCSException('', OCSController::RESPOND_NOT_FOUND);
throw new OCSException('', \OCP\API::RESPOND_NOT_FOUND);
}
$subAdminManager = $this->groupManager->getSubAdmin();
if (!$this->groupManager->isAdmin($currentLoggedInUser->getUID())
&& !$subAdminManager->isUserAccessible($currentLoggedInUser, $targetUser)) {
throw new OCSException('', OCSController::RESPOND_NOT_FOUND);
throw new OCSException('', \OCP\API::RESPOND_NOT_FOUND);
}
} else {
$targetUser = $currentLoggedInUser;

Loading…
Cancel
Save