chore: merge authorization contexts (#12816)

* chore: merge authorization contexts

Instead of 2 auth contexts from apikey and dbauthz, merge them to
just use dbauthz. It is annoying to have two.

* fixup authorization reference
This commit is contained in:
Steven Masley
2024-03-29 10:14:27 -05:00
committed by GitHub
parent 8e2d026d99
commit eeb3d63be6
16 changed files with 68 additions and 99 deletions
+2 -2
View File
@@ -476,8 +476,8 @@ type API struct {
//
// This header is used by the CLI to display warnings to the user without having
// to make additional requests!
func (api *API) writeEntitlementWarningsHeader(a httpmw.Authorization, header http.Header) {
roles, err := a.Actor.Roles.Expand()
func (api *API) writeEntitlementWarningsHeader(a rbac.Subject, header http.Header) {
roles, err := a.Roles.Expand()
if err != nil {
return
}