Merge branch 'master' into dev-job-archive-module

This commit is contained in:
Jan Eitzinger
2022-09-26 15:12:46 +02:00
committed by GitHub
25 changed files with 713 additions and 330 deletions

View File

@@ -152,9 +152,7 @@ func (r *queryResolver) Job(ctx context.Context, id string) (*schema.Job, error)
return nil, err
}
if user := auth.GetUser(ctx); user != nil &&
!user.HasRole(auth.RoleAdmin) &&
job.User != user.Username {
if user := auth.GetUser(ctx); user != nil && !user.HasRole(auth.RoleAdmin) && !user.HasRole(auth.RoleSupport) && job.User != user.Username {
return nil, errors.New("you are not allowed to see this job")
}