1
0

implemented deletomg a team from a list

This commit is contained in:
kolaente
2018-07-24 17:32:08 +02:00
committed by konrad
parent 227a2afd37
commit 9638f36788
2 changed files with 31 additions and 1 deletions

View File

@ -1,7 +1,13 @@
package models
// CanCreate checks if the use can create a team <-> list relation
// 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)
}