From fb568d345284895fc190a3429f2a5fb69949eb5d Mon Sep 17 00:00:00 2001 From: Aaron Bushnell Date: Thu, 14 Feb 2019 08:57:44 -0500 Subject: [PATCH] Fix issue where only admins had "Edit entry" option Fixes #7 --- CHANGELOG.md | 5 +++++ composer.json | 2 +- src/templates/visor.twig | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2020ceb..ed88413 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Release Notes for Visor +## 2.0.5 - 2019-02-14 + +### Fixed +- Corrected issue where only admins saw the "Edit entry" option ([#7](https://github.com/trendyminds/visor/issues/7)) + ## 2.0.4 - 2019-02-01 ### Fixed diff --git a/composer.json b/composer.json index 284ba8d..5f1679a 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "trendyminds/visor", "description": "A simple admin overlay to get to the relevant areas of the Craft CMS control panel", "type": "craft-plugin", - "version": "2.0.4", + "version": "2.0.5", "keywords": [ "craft", "cms", diff --git a/src/templates/visor.twig b/src/templates/visor.twig index 6f4a65e..d2e2cb4 100644 --- a/src/templates/visor.twig +++ b/src/templates/visor.twig @@ -28,7 +28,7 @@
{% if entry.getSection() is defined %} - {% if currentUser.can('editEntries:' ~ entry.getSection().id) %} + {% if currentUser.can('editEntries:' ~ entry.getSection().uid) %} Edit entry