From 8ca2d04cad3e20869a2d4250cd58f5249152c7a8 Mon Sep 17 00:00:00 2001 From: bencroker Date: Fri, 3 May 2024 17:31:59 -0600 Subject: [PATCH] Fix value of JS variable --- CHANGELOG.md | 6 ++++++ composer.json | 2 +- src/assets/CpAsset.php | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dc23d48f..387c538a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Release Notes for Campaign +## 3.1.3 - 2024-05-03 + +### Fixed + +- Fixed a bug in which non-admin users without permissions to edit segments were not seeing content ([#472](https://github.com/putyourlightson/craft-campaign/issues/472)). + ## 3.1.2 - 2024-05-02 ### Fixed diff --git a/composer.json b/composer.json index b4c00990..15ff8b68 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "putyourlightson/craft-campaign", "description": "Send and manage email campaigns, contacts and mailing lists.", - "version": "3.1.2", + "version": "3.1.3", "type": "craft-plugin", "homepage": "https://putyourlightson.com/plugins/campaign", "license": "proprietary", diff --git a/src/assets/CpAsset.php b/src/assets/CpAsset.php index 8a61d6dd..35398fae 100644 --- a/src/assets/CpAsset.php +++ b/src/assets/CpAsset.php @@ -83,7 +83,7 @@ private function registerEditableTypes(BaseView $view): void $editableSendoutTypes = Json::encode($this->getEditableSendoutTypes()); $user = Craft::$app->getUser()->getIdentity(); - $canEditSegments = $user->can('campaign:segments'); + $canEditSegments = $user->can('campaign:segments') ? 'true' : 'false'; $js = <<