Skip to content

Commit 2190789

Browse files
committed
Reverting partial change from PR 7891. (#7929)
(cherry picked from commit dc9c375)
1 parent 6cb2bca commit 2190789

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
8686
- [#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.
8787

8888
### Fixed
89-
- [#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
89+
- [#7891](https://github.com/apache/trafficcontrol/pull/7891) *Traffic Ops*: Updated job routes for v4 and v5.
9090
- [#7890](https://github.com/apache/trafficcontrol/pull/7890) *Traffic Ops*: Fixed missing changelog entries to v5 routes.
9191
- [#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
9292
- [#7885](https://github.com/apache/trafficcontrol/pull/7885) *Traffic Portal*: Fixed the issue where Compare Profiles page was not being displayed.

traffic_ops/traffic_ops_golang/routing/middleware/wrappers.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -120,11 +120,9 @@ func (a AuthBase) GetWrapper(privLevelRequired int) Middleware {
120120
return
121121
}
122122
} else {
123-
if v.Major < 5 {
124-
if !cfg.RoleBasedPermissions && user.PrivLevel < privLevelRequired {
125-
api.HandleErr(w, r, nil, http.StatusForbidden, errors.New("Forbidden."), nil)
126-
return
127-
}
123+
if !cfg.RoleBasedPermissions && user.PrivLevel < privLevelRequired {
124+
api.HandleErr(w, r, nil, http.StatusForbidden, errors.New("Forbidden."), nil)
125+
return
128126
}
129127
}
130128
api.AddUserToReq(r, user)

0 commit comments

Comments
 (0)