1
0

Added methods to revoke a users access to a list

This commit is contained in:
konrad
2018-08-30 18:52:12 +02:00
committed by kolaente
parent b1c3e92f66
commit efaa277751
5 changed files with 87 additions and 1 deletions

View File

@ -32,3 +32,10 @@ func (lu *ListUser) CanCreate(doer *User) bool {
l, _ := GetListByID(lu.ListID)
return l.CanWrite(doer)
}
// CanDelete checks if the user can delete a user <-> list relation
func (lu *ListUser) CanDelete(doer *User) bool {
// Get the list and check if the user has write access on it
l, _ := GetListByID(lu.ListID)
return l.CanWrite(doer)
}