Last active
August 29, 2015 14:01
-
-
Save mdcpepper/2076eeca03e4a6bfa6f6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{%- if currentUser.admin | |
or ( | |
( entry.authorId == currentUser.id and currentUser.can('editEntries:' ~ entry.section.id) ) | |
or ( entry.authorId != currentUser.id and currentUser.can('editPeerEntries:' ~ entry.section.id) ) | |
or ( | |
entry.section.type == 'Single' and | |
( entry.authorId == currentUser.id and currentUser.can('editEntries:' ~ entry.section.id) ) | |
or ( entry.authorId != currentUser.id and currentUser.can('editPeerEntryDrafts:' ~ entry.section.id) ) | |
) | |
) | |
-%} | |
<a href="{{ entry.cpEditUrl }}">Edit</a> | |
{%- endif -%} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment