vikunja-api/models/team_list_rights.go
konrad 7dc8699cbd
updated todo
+ fmt
2018-07-24 17:47:08 +02:00

13 lines
367 B
Go

package models
// CanCreate checks if the user can create a team <-> list relation
func (tl *TeamList) CanCreate(user *User) bool {
l, _ := GetListByID(tl.ListID)
return l.IsAdmin(user)
}
// CanDelete checks if the user can delete a team <-> list relation
func (tl *TeamList) CanDelete(user *User) bool {
l, _ := GetListByID(tl.ListID)
return l.IsAdmin(user)
}