refs #4253 supplant security code uncommented

This commit is contained in:
Juan Ferrer 2023-02-26 02:12:45 +01:00
parent 511e925467
commit 197758f2bc
1 changed files with 2 additions and 2 deletions

View File

@ -10,7 +10,7 @@ class Supplant extends Vn\Web\JsonRequest {
'SELECT id FROM account.user WHERE `name` = #', 'SELECT id FROM account.user WHERE `name` = #',
[$_REQUEST['supplantUser']] [$_REQUEST['supplantUser']]
); );
/*
$isClient = $db->getValue( $isClient = $db->getValue(
'SELECT COUNT(*) > 0 FROM vn.client WHERE id = #', 'SELECT COUNT(*) > 0 FROM vn.client WHERE id = #',
[$userId] [$userId]
@ -24,7 +24,7 @@ class Supplant extends Vn\Web\JsonRequest {
); );
if ($hasAccount) if ($hasAccount)
throw new Web\ForbiddenException(s('The user is not impersonable')); throw new Web\ForbiddenException(s('The user is not impersonable'));
*/
return $this->service->createToken($_REQUEST['supplantUser']); return $this->service->createToken($_REQUEST['supplantUser']);
} }
} }