Browse Source

Merge pull request #2435 from kmlebedev/delAmzIsAdmin

force overwrite s3-is-admin
pull/2440/head
Chris Lu 3 years ago
committed by GitHub
parent
commit
835e2d2ddf
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      weed/s3api/auth_credentials.go

2
weed/s3api/auth_credentials.go

@ -187,6 +187,8 @@ func (iam *IdentityAccessManagement) Auth(f http.HandlerFunc, action Action) htt
r.Header.Set(xhttp.AmzIdentityId, identity.Name)
if identity.isAdmin() {
r.Header.Set(xhttp.AmzIsAdmin, "true")
} else if _, ok := r.Header[xhttp.AmzIsAdmin]; ok {
r.Header.Del(xhttp.AmzIsAdmin)
}
}
f(w, r)

Loading…
Cancel
Save