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

@@ -149,12 +149,12 @@ func setupTaglistRoute(i InfoType, r *http.Request) InfoType {
jobRepo := repository.GetJobRepository()
user := auth.GetUser(r.Context())
if (user != nil && user.HasNotRoles([]string{auth.RoleAdmin, auth.RoleManager})) {
if (user != nil && user.HasNotRoles([]string{auth.RoleAdmin, auth.RoleSupport, auth.RoleManager})) {
username = &user.Username
} else if (user != nil && user.HasRole(auth.RoleManager)) {
username = &user.Username
project = &user.Project
}
} // ADMINS && SUPPORT w/o additional conditions
tags, counts, err := jobRepo.CountTags(username, project)
tagMap := make(map[string][]map[string]interface{})