diff --git a/includes/Pages/RequestAction/PageDeferRequest.php b/includes/Pages/RequestAction/PageDeferRequest.php index bb5a8a59f..e11399ce7 100644 --- a/includes/Pages/RequestAction/PageDeferRequest.php +++ b/includes/Pages/RequestAction/PageDeferRequest.php @@ -56,6 +56,13 @@ protected function main() } } + if ($request->getEmail() === $this->getSiteConfiguration()->getDataClearEmail()) { + if (!$this->barrierTest('reopenClearedRequest', $currentUser, 'RequestData')) { + throw new ApplicationLogicException( + "You are not allowed to re-open a request for which the private data has been purged."); + } + } + if ($request->getStatus() === RequestStatus::JOBQUEUE) { /** @var JobQueue[] $pendingJobs */ $pendingJobs = JobQueueSearchHelper::get($database)->byRequest($request->getId())->statusIn([ diff --git a/includes/Security/RoleConfiguration.php b/includes/Security/RoleConfiguration.php index b76d54ad7..1b20e9f9d 100644 --- a/includes/Security/RoleConfiguration.php +++ b/includes/Security/RoleConfiguration.php @@ -242,6 +242,9 @@ class RoleConfiguration 'acknowledge' => self::ACCESS_ALLOW, 'requeue' => self::ACCESS_ALLOW, ), + 'RequestData' => array( + 'reopenClearedRequest' => self::ACCESS_ALLOW, + ), ), 'checkuser' => array( '_description' => 'A user with CheckUser access',