1
0

Refactored canRead method to get the list before checking the right (#65)

This commit is contained in:
konrad
2019-03-24 13:17:36 +00:00
committed by Gitea
parent 47352d3ed4
commit 5525ee0328
7 changed files with 15 additions and 16 deletions

View File

@ -69,7 +69,6 @@ func (l *Label) hasAccessToLabel(a web.Auth) (bool, error) {
Where("label_task.label_id != null OR labels.created_by_id = ?", u.ID).
Or(builder.In("label_task.task_id", taskIDs)).
And("labels.id = ?", l.ID).
GroupBy("labels.id").
Exist(&labels)
return has, err
}