1
0

Improved item deletion rights check

This commit is contained in:
konrad
2018-06-12 18:49:56 +02:00
committed by kolaente
parent 1bb7187285
commit 1b3b2ccb59
3 changed files with 20 additions and 1 deletions

View File

@ -89,7 +89,7 @@ func DeleteListItemByID(itemID int64, doer *User) (err error) {
// Check if the user hat the right to delete that item
if listitem.CreatedByID != doer.ID {
return
return ErrNeedToBeItemOwner{ItemID:itemID, UserID: doer.ID}
}
_, err = x.ID(itemID).Delete(ListItem{})