1
0

fix(projects): do not return parent project id of parents where the user does not have access

This caused the frontend to not show such projects, throwing errors in the process and sometimes made it hang.
This commit is contained in:
kolaente
2024-04-07 12:10:20 +02:00
parent f1c3ce5eeb
commit c1d06c5e5a
2 changed files with 23 additions and 12 deletions

View File

@ -77,7 +77,7 @@ func (l *Label) hasAccessToLabel(s *xorm.Session, a web.Auth) (has bool, maxRigh
builder.
Select("id").
From("tasks").
Where(builder.In("project_id", getUserProjectsStatement(nil, u.ID, "", false).Select("l.id"))),
Where(builder.In("project_id", getUserProjectsStatement(u.ID, "", false).Select("l.id"))),
)
ll := &LabelTask{}