Skip to content
Snippets Groups Projects
Commit 18e63c6c authored by Jean-Laurent DUZANT's avatar Jean-Laurent DUZANT
Browse files

FIX #17671 TIME 0:05 checking hardDelete privilege before search

parent 98cdcec1
No related branches found
No related tags found
No related merge requests found
......@@ -36,7 +36,7 @@ class SearchController
$queryParams['softDeleted'] = empty($queryParams['softDeleted']) ? false : $queryParams['softDeleted'] == 'true';
$queryParams['hardDeleted'] = empty($queryParams['hardDeleted']) ? false : $queryParams['hardDeleted'] == 'true';
if ($queryParams['softDeleted'] && !PrivilegeController::hasPrivilege(['userId' => $GLOBALS['id'], 'privilege' => 'can_purge'])) {
if (($queryParams['softDeleted'] || $queryParams['softDeleted']) && !PrivilegeController::hasPrivilege(['userId' => $GLOBALS['id'], 'privilege' => 'can_purge'])) {
return $response->withStatus(403)->withJson(['errors' => 'Privilege forbidden']);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment