1
0

implemented update method via param binder

This commit is contained in:
konrad
2018-07-21 15:17:02 +02:00
committed by kolaente
parent 9e75e9b73b
commit 9979b7e321
12 changed files with 25 additions and 36 deletions

View File

@ -11,9 +11,9 @@ func (i *ListItem) CanDelete(doer *User) bool {
}
// CanUpdate determines if a user has the right to update a list item
func (i *ListItem) CanUpdate(doer *User, id int64) bool {
func (i *ListItem) CanUpdate(doer *User) bool {
// Get the item
lI, _ := GetListItemByID(id)
lI, _ := GetListItemByID(i.ID)
// A user can update an item if he has write acces to its list
list, _ := GetListByID(lI.ListID)