Skip to content

Commit

Permalink
dont nil-check acl
Browse files Browse the repository at this point in the history
  • Loading branch information
philrenaud committed Oct 20, 2023
1 parent bde0d8c commit 1fe0e11
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nomad/job_endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -1734,7 +1734,7 @@ func (j *Job) GetActions(args *structs.JobSpecificRequest, reply *structs.Action
// Check for read-job permissions
if aclObj, err := j.srv.ResolveACL(args); err != nil {
return err
} else if aclObj != nil && !aclObj.AllowNsOp(args.RequestNamespace(), acl.NamespaceCapabilityReadJob) {
} else if !aclObj.AllowNsOp(args.RequestNamespace(), acl.NamespaceCapabilityReadJob) {
return structs.ErrPermissionDenied
}

Expand Down

0 comments on commit 1fe0e11

Please sign in to comment.