Browse Source

check auth only when enabled

pull/2427/head
Chris Lu 3 years ago
parent
commit
35c37562bc
  1. 2
      weed/s3api/s3api_bucket_handlers.go

2
weed/s3api/s3api_bucket_handlers.go

@ -111,10 +111,12 @@ func (s3a *S3ApiServer) PutBucketHandler(w http.ResponseWriter, r *http.Request)
return
}
if s3a.iam.isEnabled() {
if _, errCode = s3a.iam.authRequest(r, s3_constants.ACTION_ADMIN); errCode != s3err.ErrNone {
s3err.WriteErrorResponse(w, r, errCode)
return
}
}
fn := func(entry *filer_pb.Entry) {
if identityId := r.Header.Get(xhttp.AmzIdentityId); identityId != "" {

Loading…
Cancel
Save