From 47bb301a9112c305f102caf39c888075e97d2247 Mon Sep 17 00:00:00 2001 From: MrRenter Date: Fri, 17 Apr 2015 22:36:09 -0400 Subject: [PATCH] Made it so edit will only be displayed for the user. Since its on client side (following practices used) a final check should be used when actually saving edit to db --- views/stories/comments.jade | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/views/stories/comments.jade b/views/stories/comments.jade index ae2b051d06..a47a969c95 100644 --- a/views/stories/comments.jade +++ b/views/stories/comments.jade @@ -22,8 +22,10 @@ commentDetails = data; var div = document.createElement('div'); var editButton = ""; - if ((Date.now() - commentDetails.commentOn) < 600000){ - editButton = "Edit · "; + if (commentDetails.author.username === user.profile.username){ + if ((Date.now() - commentDetails.commentOn) < 600000){ + editButton = "Edit · "; + } } $(div) .html(