1
0

implemented create team <-> namespace relation

This commit is contained in:
konrad
2018-07-17 08:44:21 +02:00
committed by kolaente
parent 2e3c10be13
commit 7feb82702d
8 changed files with 80 additions and 17 deletions

View File

@ -0,0 +1,7 @@
package models
// CanCreate checks if one can create a new team <-> namespace relation
func (tn *TeamNamespace) CanCreate(user *User, _ int64) bool {
n, _ := GetNamespaceByID(tn.NamespaceID)
return n.IsAdmin(user)
}