Skip to content

Commit

Permalink
remove useless nil check
Browse files Browse the repository at this point in the history
  • Loading branch information
tgross committed Oct 12, 2023
1 parent 3501515 commit 9701aca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nomad/service_registration_endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ func (s *ServiceRegistration) List(
if err != nil {
return err
}
if aclObj != nil && !aclObj.AllowServiceRegistrationReadList(args.RequestNamespace(),
if !aclObj.AllowServiceRegistrationReadList(args.RequestNamespace(),
args.GetIdentity().Claims != nil) {
return structs.ErrPermissionDenied
}
Expand Down Expand Up @@ -343,7 +343,7 @@ func (s *ServiceRegistration) GetService(
if err != nil {
return structs.ErrPermissionDenied
}
if aclObj != nil && !aclObj.AllowServiceRegistrationReadList(args.RequestNamespace(),
if !aclObj.AllowServiceRegistrationReadList(args.RequestNamespace(),
args.GetIdentity().Claims != nil) {
return structs.ErrPermissionDenied
}
Expand Down

0 comments on commit 9701aca

Please sign in to comment.