From 20c4c0ef972fb13eaf7c0bc64fa7936da97a53da Mon Sep 17 00:00:00 2001 From: Bauke Date: Mon, 8 Nov 2021 00:00:33 +0100 Subject: [PATCH] FIX Cast IDs from database on both sides of equation #58 (#60) * FIX Cast IDs from database on both sides of equation #58 (now based on branch 2.5) --- src/Forms/GridFieldQueuedExportButton.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Forms/GridFieldQueuedExportButton.php b/src/Forms/GridFieldQueuedExportButton.php index 0677596..b73d18a 100644 --- a/src/Forms/GridFieldQueuedExportButton.php +++ b/src/Forms/GridFieldQueuedExportButton.php @@ -170,7 +170,7 @@ public function checkExport($gridField, $request = null) $id = $request->param('ID'); $job = QueuedJobDescriptor::get()->filter('Signature', $id)->first(); - if ((int)$job->RunAsID !== Security::getCurrentUser()->ID) { + if ((int)$job->RunAsID !== (int)Security::getCurrentUser()->ID) { return Security::permissionFailure(); } @@ -241,7 +241,7 @@ public function downloadExport($gridField, $request = null) $id = $request->param('ID'); $job = QueuedJobDescriptor::get()->filter('Signature', $id)->first(); - if ((int)$job->RunAsID !== Security::getCurrentUser()->ID) { + if ((int)$job->RunAsID !== (int)Security::getCurrentUser()->ID) { return Security::permissionFailure(); }