data, logs, logs-content, story, story-content: Added permission check in UI to hide disallowed actions.

This commit is contained in:
2018-10-13 12:31:05 +02:00
parent 5187704b02
commit 8345d1fc91
22 changed files with 158 additions and 43 deletions
@@ -4,8 +4,12 @@ import moment from "moment"
<a class="anchor" id=input.chapter.id />
<div class="metadata">
<div class="options color-menu">
<a on-click("open", "edit") >Edit</a>
<a on-click("open", "remove") >Remove</a>
<if-permitted user=input.user author=input.chapter.author permission="chapter.edit">
<a on-click("open", "edit") >Edit</a>
</if-permitted>
<if-permitted user=input.user author=input.chapter.author permission="chapter.remove">
<a on-click("open", "remove") >Remove</a>
</if-permitted>
</div>
<chapter-meta kind="title" value=input.chapter.title />
<chapter-meta kind="date" value=input.chapter.fictionalDate />