7y-9
10 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
2 additions and
8 deletions
-
weed/s3api/s3api_bucket_handlers.go
-
weed/s3api/s3api_server.go
|
@ -123,13 +123,6 @@ func (s3a *S3ApiServer) PutBucketHandler(w http.ResponseWriter, r *http.Request) |
|
|
return |
|
|
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) { |
|
|
fn := func(entry *filer_pb.Entry) { |
|
|
if identityId := r.Header.Get(s3_constants.AmzIdentityId); identityId != "" { |
|
|
if identityId := r.Header.Get(s3_constants.AmzIdentityId); identityId != "" { |
|
|
if entry.Extended == nil { |
|
|
if entry.Extended == nil { |
|
|
|
@ -276,7 +276,8 @@ func (s3a *S3ApiServer) registerRouter(router *mux.Router) { |
|
|
bucket.Methods("HEAD").HandlerFunc(track(s3a.iam.Auth(s3a.cb.Limit(s3a.HeadBucketHandler, ACTION_READ)), "GET")) |
|
|
bucket.Methods("HEAD").HandlerFunc(track(s3a.iam.Auth(s3a.cb.Limit(s3a.HeadBucketHandler, ACTION_READ)), "GET")) |
|
|
|
|
|
|
|
|
// PutBucket
|
|
|
// PutBucket
|
|
|
bucket.Methods("PUT").HandlerFunc(track(s3a.PutBucketHandler, "PUT")) |
|
|
|
|
|
|
|
|
bucket.Methods("PUT").HandlerFunc(track(s3a.iam.Auth(s3a.cb.Limit(s3a.PutBucketHandler, ACTION_ADMIN)), "PUT")) |
|
|
|
|
|
|
|
|
// DeleteBucket
|
|
|
// DeleteBucket
|
|
|
bucket.Methods("DELETE").HandlerFunc(track(s3a.iam.Auth(s3a.cb.Limit(s3a.DeleteBucketHandler, ACTION_ADMIN)), "DELETE")) |
|
|
bucket.Methods("DELETE").HandlerFunc(track(s3a.iam.Auth(s3a.cb.Limit(s3a.DeleteBucketHandler, ACTION_ADMIN)), "DELETE")) |
|
|
|
|
|
|
|
|