If user is not list owner, hide buttons to move

It previously errored with a message that you are the wrong user.
This commit is contained in:
Sam Wing 2019-11-16 22:24:00 -05:00
parent 028a4be860
commit 004dfe44ec

View file

@ -48,12 +48,12 @@ block content
.field.inline .field.inline
.control.inline .control.inline
input.inline.button(type='submit', value='Add note') 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}`) form.inline(method='POST', action=`/wishlist/${req.params.user}/move/up/${item.id}`)
.field.inline .field.inline
.control.inline .control.inline
input.inline.button(type='submit' value='Move item up') 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}`) form.inline(method='POST', action=`/wishlist/${req.params.user}/move/down/${item.id}`)
.field.inline .field.inline
.control.inline .control.inline