Add support role to tag count

- works equal to admin
This commit is contained in:
Christoph Kluge
2023-01-30 13:48:27 +01:00
parent 2590ce7e44
commit c4d91039e2
2 changed files with 3 additions and 3 deletions

View File

@@ -82,7 +82,7 @@ func (r *JobRepository) CountTags(user *string, project *string) (tags []schema.
q = q.Where("jt.job_id IN (SELECT id FROM job WHERE job.user = ?)", *user)
} else if (user != nil && project != nil) { // MANAGER: Count own jobs plus project's jobs
q = q.Where("jt.job_id IN (SELECT id FROM job WHERE job.user = ? OR job.project = ?)", *user, *project)
} // else: ADMIN: Count all jobs
} // else: ADMIN || SUPPORT: Count all jobs
rows, err := q.RunWith(r.stmtCache).Query()
if err != nil {