From 1f3f8afa85bab48df0430b53abef3cc892006ac0 Mon Sep 17 00:00:00 2001 From: kolaente Date: Wed, 12 Sep 2018 20:13:00 +0200 Subject: [PATCH] Fixed a bug where it was not possible for a user to see a namespace which could be access by a team the user was in --- models/list_rights.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/list_rights.go b/models/list_rights.go index 480d4adf82e..977350b34e1 100644 --- a/models/list_rights.go +++ b/models/list_rights.go @@ -68,7 +68,7 @@ func (l *List) checkListTeamRight(user *User, r TeamRight) bool { exists, err := x.Select("l.*"). Table("list"). Alias("l"). - Join("LEFT", []string{"team_namespaces", "tn"}, "tn.namespace_id = tn.id"). + Join("LEFT", []string{"team_namespaces", "tn"}, " l.namespace_id = tn.namespace_id"). Join("LEFT", []string{"team_members", "tm"}, "tm.team_id = tn.team_id"). Join("LEFT", []string{"team_list", "tl"}, "l.id = tl.list_id"). Join("LEFT", []string{"team_members", "tm2"}, "tm2.team_id = tl.team_id").