Skip to content

Commit

Permalink
FIX Cast IDs from database on both sides of equation #58 (#60)
Browse files Browse the repository at this point in the history
* FIX Cast IDs from database on both sides of equation #58 (now based on branch 2.5)
  • Loading branch information
baukezwaan authored Nov 7, 2021
1 parent 4ccabdf commit 20c4c0e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Forms/GridFieldQueuedExportButton.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down Expand Up @@ -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();
}

Expand Down

0 comments on commit 20c4c0e

Please sign in to comment.