Skip to content
Permalink
Browse files

posts: show delete button only if owner

  • Loading branch information...
3v0k4 committed Jul 21, 2019
1 parent db722e7 commit 2378194354b6e0e92fb1c83ac5feb97aac8d219b
Showing with 4 additions and 1 deletion.
  1. +4 −1 templates/posts.hamlet
@@ -14,4 +14,7 @@
<h2> #{postTitle $ entityVal post}
<p> #{postText $ entityVal post}
<form method=post action=@{PostR $ entityKey post}?_method=DELETE>
<button>Delete
$if userId == (postUserId $ entityVal post)
<button>Delete
$else
<p>

0 comments on commit 2378194

Please sign in to comment.
You can’t perform that action at this time.