Skip to content

Commit

Permalink
Fix issue where only admins had "Edit entry" option
Browse files Browse the repository at this point in the history
Fixes #7
  • Loading branch information
aaronbushnell committed Feb 14, 2019
1 parent b49aba3 commit fb568d3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/templates/visor.twig
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</div>
<div class="Visor__controls">
{% if entry.getSection() is defined %}
{% if currentUser.can('editEntries:' ~ entry.getSection().id) %}
{% if currentUser.can('editEntries:' ~ entry.getSection().uid) %}
<a class="Visor__link" target="_blank" href="{{entry.cpEditUrl}}">
<svg class="Visor__link-icon" width="67" height="50" viewBox="5 10 67 50" xmlns="http://www.w3.org/2000/svg"><g fill-rule="evenodd"><path d="M69.47 14.86L66.1 12.1c-1.73-1.37-4.27-1.1-5.7.6L32.14 47.14c-.16.2-.26.44-.3.7l-1.13 9.43c0 .47.18.94.5 1.24.4.3.9.4 1.37.27l8.8-3.22c.24-.07.44-.2.6-.4L70.1 20.68c1.42-1.76 1.16-4.35-.6-5.78zm-13.1 7.04l5.47 4.47L42.56 50l-5.5-4.47 19.3-23.63zm-22.7 33.5l.9-6.83.77-.96 5.5 4.5-.8 1-6.37 2.33zm34.3-36.5l-4.4 5.4-5.48-4.5 4.32-5.33c.5-.55 1.33-.63 1.93-.18L67.7 17c.55.5.63 1.3.2 1.87h.03z"/><path d="M41.9 44.5c.76.33 1.65.02 2.06-.7l12.6-15.43c.63-.54.76-1.47.3-2.17-.78-.32-1.67 0-2.07.73l-12.7 15.4c-.63.57-.74 1.5-.26 2.18zm11.04-26.56l2.5-3.03H7.26v.1c-.8 0-1.43.68-1.43 1.47 0 .8.64 1.43 1.43 1.43v.07h45.7-.02zm-7.64 9.3l2.5-3.04H7.25v.1c-.8 0-1.43.63-1.43 1.4 0 .8.64 1.44 1.43 1.44v.1H45.3zm-7.44 9.4l2.5-3.04H7.26v.1c-.8 0-1.43.63-1.43 1.4 0 .8.64 1.44 1.43 1.44v.1h30.6zm-8.46 9.4L31.9 43H7.27v.1c-.8 0-1.43.63-1.43 1.4 0 .8.64 1.44 1.43 1.44v.1H29.4z"/></g></svg>
Edit entry
Expand Down

0 comments on commit fb568d3

Please sign in to comment.