Fix loading all rights (list & namespace)
continuous-integration/drone/pr Build is failing Details

This commit is contained in:
kolaente 2020-08-09 17:58:57 +02:00
parent 6469722521
commit d6582ff65a
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
2 changed files with 7 additions and 7 deletions

View File

@ -176,16 +176,16 @@ func (l *List) checkRight(a web.Auth, rights ...Right) (bool, int, error) {
conds = append(conds, builder.Eq{"n.owner_id": a.GetID()})
type allListRights struct {
UserNamespace NamespaceUser `xorm:"extend"`
UserList ListUser `xorm:"extend"`
UserNamespace NamespaceUser `xorm:"extends"`
UserList ListUser `xorm:"extends"`
TeamNamespace TeamNamespace `xorm:"extend"`
TeamList TeamList `xorm:"extend"`
TeamNamespace TeamNamespace `xorm:"extends"`
TeamList TeamList `xorm:"extends"`
}
r := &allListRights{}
var maxRight = 0
exists, err := x.Select("*").
exists, err := x.
Table("list").
Alias("l").
// User stuff

View File

@ -107,8 +107,8 @@ func (n *Namespace) checkRight(a web.Auth, rights ...Right) (bool, int, error) {
}
type allRights struct {
UserNamespace NamespaceUser `xorm:"extend"`
TeamNamespace TeamNamespace `xorm:"extend"`
UserNamespace NamespaceUser `xorm:"extends"`
TeamNamespace TeamNamespace `xorm:"extends"`
}
var maxRights = 0