Browse Source

get identity

pull/8388/head
Chris Lu 2 days ago
parent
commit
b7eae6539b
  1. 3
      weed/s3api/s3tables/iam.go

3
weed/s3api/s3tables/iam.go

@ -26,6 +26,9 @@ func (h *S3TablesHandler) shouldUseIAM(r *http.Request, identityActions, identit
if h.iamAuthorizer == nil || r == nil { if h.iamAuthorizer == nil || r == nil {
return false return false
} }
if s3_constants.GetIdentityFromContext(r) == nil {
return false
}
// An empty inline `identityActions` slice doesn't mean the identity has no // An empty inline `identityActions` slice doesn't mean the identity has no
// permissions—it just means authorization lives in IAM policies or session // permissions—it just means authorization lives in IAM policies or session
// tokens instead of static action lists. We therefore prefer the IAM path // tokens instead of static action lists. We therefore prefer the IAM path

Loading…
Cancel
Save