From 004dfe44ec7e4330ef44a2a17d429755dcb740b3 Mon Sep 17 00:00:00 2001 From: Sam Wing Date: Sat, 16 Nov 2019 22:24:00 -0500 Subject: [PATCH] If user is not list owner, hide buttons to move It previously errored with a message that you are the wrong user. --- views/wishlist.pug | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/views/wishlist.pug b/views/wishlist.pug index 35448d4..dad4cc5 100644 --- a/views/wishlist.pug +++ b/views/wishlist.pug @@ -48,12 +48,12 @@ block content .field.inline .control.inline input.inline.button(type='submit', value='Add note') - if index !== firstCanSee + if index !== firstCanSee && req.user._id === req.params.user form.inline(method='POST', action=`/wishlist/${req.params.user}/move/up/${item.id}`) .field.inline .control.inline input.inline.button(type='submit' value='Move item up') - if index !== lastCanSee + if index !== lastCanSee && req.user._id === req.params.user form.inline(method='POST', action=`/wishlist/${req.params.user}/move/down/${item.id}`) .field.inline .control.inline