1
0
Fork 0
mirror of https://github.com/chrislusf/seaweedfs synced 2024-07-07 09:37:49 +02:00

s3: only admin can list all buckets

This commit is contained in:
Chris Lu 2020-10-08 10:11:41 -07:00
parent 4882972478
commit 9e7a2772b1

View file

@ -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)