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

This commit is contained in:
kolaente 2018-09-12 20:13:00 +02:00
parent e85d3c4f36
commit 1f3f8afa85
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B

View file

@ -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").