From 0415c44368a83e03724a88be04e20cb6d23ac577 Mon Sep 17 00:00:00 2001 From: Fred Carlsen Date: Thu, 6 Jun 2019 11:10:47 +0200 Subject: [PATCH] Fixed error when trying to download export for a user without access to the CP Fixes #11 --- CHANGELOG.md | 4 ++++ composer.json | 2 +- src/services/BeamService.php | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 58f2fc1..bcaee5b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +## 2.1.4 - 2019-06-06 +### Fixed +- Fixed error when trying to download export for a user without access to the CP + ## 2.1.3 - 2019-02-02 ### Added - Added route so Beam can be used in the control panel diff --git a/composer.json b/composer.json index 42ecef1..300acd0 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "superbig/craft3-beam", "description": "Generate CSVs and XLS files in your templates", "type": "craft-plugin", - "version": "2.1.3", + "version": "2.1.4", "keywords": [ "craft", "cms", diff --git a/src/services/BeamService.php b/src/services/BeamService.php index 04b4640..b244f20 100644 --- a/src/services/BeamService.php +++ b/src/services/BeamService.php @@ -140,7 +140,7 @@ private function writeAndRedirect($content, $filename, $mimeType) $hashConfig = $this->hashConfig($config); $verifyHash = Craft::$app->getSecurity()->hashData($hashConfig); - $url = UrlHelper::url('beam/download', [ + $url = UrlHelper::siteUrl('beam/download', [ 'hash' => $verifyHash, ]);