Skip to content

Commit

Permalink
Reverting partial change from PR 7891. (#7929)
Browse files Browse the repository at this point in the history
(cherry picked from commit dc9c375)
  • Loading branch information
rimashah25 committed Jan 30, 2024
1 parent 6cb2bca commit 2190789
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- [#7814](https://github.com/apache/trafficcontrol/issues/7814) All Go components: Updated the module path to [`github.com/apache/trafficcontrol/v8`](https://pkg.go.dev/github.com/apache/trafficcontrol/v8). Module https://pkg.go.dev/github.com/apache/trafficcontrol will not receive further updates.

### Fixed
- [#7891](https://github.com/apache/trafficcontrol/pull/7891) *Traffic Ops*: Created clause to distinguish api versions < 5 when handling 403 in middleware wrappers and updated job routes for v4 and v5
- [#7891](https://github.com/apache/trafficcontrol/pull/7891) *Traffic Ops*: Updated job routes for v4 and v5.
- [#7890](https://github.com/apache/trafficcontrol/pull/7890) *Traffic Ops*: Fixed missing changelog entries to v5 routes.
- [#7887](https://github.com/apache/trafficcontrol/pull/7887) *Traffic Ops*: Limit Delivery Services returned for GET /servers/{id}/deliveryservices to ones in the same CDN
- [#7885](https://github.com/apache/trafficcontrol/pull/7885) *Traffic Portal*: Fixed the issue where Compare Profiles page was not being displayed.
Expand Down
8 changes: 3 additions & 5 deletions traffic_ops/traffic_ops_golang/routing/middleware/wrappers.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,9 @@ func (a AuthBase) GetWrapper(privLevelRequired int) Middleware {
return
}
} else {
if v.Major < 5 {
if !cfg.RoleBasedPermissions && user.PrivLevel < privLevelRequired {
api.HandleErr(w, r, nil, http.StatusForbidden, errors.New("Forbidden."), nil)
return
}
if !cfg.RoleBasedPermissions && user.PrivLevel < privLevelRequired {
api.HandleErr(w, r, nil, http.StatusForbidden, errors.New("Forbidden."), nil)
return
}
}
api.AddUserToReq(r, user)
Expand Down

1 comment on commit 2190789

@alphachart
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

://

Please sign in to comment.