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

@ -71,8 +71,8 @@ func (n *Namespace) CanRead(user *User) bool {
}
// CanUpdate checks if the user can update the namespace
func (n *Namespace) CanUpdate(user *User, id int64) bool {
nn, _ := GetNamespaceByID(id)
func (n *Namespace) CanUpdate(user *User) bool {
nn, _ := GetNamespaceByID(n.ID)
return nn.IsAdmin(user)
}