Browse Source

s3: only admin can list all buckets

pull/1516/head
Chris Lu 4 years ago
parent
commit
9e7a2772b1
  1. 2
      weed/s3api/s3api_server.go

2
weed/s3api/s3api_server.go

@ -119,7 +119,7 @@ func (s3a *S3ApiServer) registerRouter(router *mux.Router) {
}
// ListBuckets
apiRouter.Methods("GET").Path("/").HandlerFunc(track(s3a.iam.Auth(s3a.ListBucketsHandler, ACTION_LIST), "LIST"))
apiRouter.Methods("GET").Path("/").HandlerFunc(track(s3a.iam.Auth(s3a.ListBucketsHandler, ACTION_ADMIN), "LIST"))
// NotFound
apiRouter.NotFoundHandler = http.HandlerFunc(notFoundHandler)

Loading…
Cancel
Save