mirror of
https://github.com/minio/minio.git
synced 2024-12-24 06:05:55 -05:00
Fix s3cmd issue with ACL handling (#5999)
With the implementation of dummy GET ACL handlers, tools like s3cmd perform few operations which causes the ACL call to be invoked. Make sure that in our router configuration GET?acl comes before actual GET call to facilitate this dummy call.
This commit is contained in:
parent
c247e603d2
commit
c22b9d5d4d
@ -82,7 +82,9 @@ func (api objectAPIHandlers) GetBucketACLHandler(w http.ResponseWriter, r *http.
|
|||||||
acl := &accessControlPolicy{}
|
acl := &accessControlPolicy{}
|
||||||
acl.AccessControlList.Grants = append(acl.AccessControlList.Grants, grant{
|
acl.AccessControlList.Grants = append(acl.AccessControlList.Grants, grant{
|
||||||
Grantee: grantee{
|
Grantee: grantee{
|
||||||
Type: "CanonicalUser",
|
XMLNS: "http://www.w3.org/2001/XMLSchema-instance",
|
||||||
|
XMLXSI: "CanonicalUser",
|
||||||
|
Type: "CanonicalUser",
|
||||||
},
|
},
|
||||||
Permission: "FULL_CONTROL",
|
Permission: "FULL_CONTROL",
|
||||||
})
|
})
|
||||||
@ -128,7 +130,9 @@ func (api objectAPIHandlers) GetObjectACLHandler(w http.ResponseWriter, r *http.
|
|||||||
acl := &accessControlPolicy{}
|
acl := &accessControlPolicy{}
|
||||||
acl.AccessControlList.Grants = append(acl.AccessControlList.Grants, grant{
|
acl.AccessControlList.Grants = append(acl.AccessControlList.Grants, grant{
|
||||||
Grantee: grantee{
|
Grantee: grantee{
|
||||||
Type: "CanonicalUser",
|
XMLNS: "http://www.w3.org/2001/XMLSchema-instance",
|
||||||
|
XMLXSI: "CanonicalUser",
|
||||||
|
Type: "CanonicalUser",
|
||||||
},
|
},
|
||||||
Permission: "FULL_CONTROL",
|
Permission: "FULL_CONTROL",
|
||||||
})
|
})
|
||||||
|
@ -69,6 +69,8 @@ func registerAPIRouter(router *mux.Router) {
|
|||||||
bucket.Methods("POST").Path("/{object:.+}").HandlerFunc(httpTraceAll(api.NewMultipartUploadHandler)).Queries("uploads", "")
|
bucket.Methods("POST").Path("/{object:.+}").HandlerFunc(httpTraceAll(api.NewMultipartUploadHandler)).Queries("uploads", "")
|
||||||
// AbortMultipartUpload
|
// AbortMultipartUpload
|
||||||
bucket.Methods("DELETE").Path("/{object:.+}").HandlerFunc(httpTraceAll(api.AbortMultipartUploadHandler)).Queries("uploadId", "{uploadId:.*}")
|
bucket.Methods("DELETE").Path("/{object:.+}").HandlerFunc(httpTraceAll(api.AbortMultipartUploadHandler)).Queries("uploadId", "{uploadId:.*}")
|
||||||
|
// GetObjectACL - this is a dummy call.
|
||||||
|
bucket.Methods("GET").Path("/{object:.+}").HandlerFunc(httpTraceHdrs(api.GetObjectACLHandler)).Queries("acl", "")
|
||||||
// GetObject
|
// GetObject
|
||||||
bucket.Methods("GET").Path("/{object:.+}").HandlerFunc(httpTraceHdrs(api.GetObjectHandler))
|
bucket.Methods("GET").Path("/{object:.+}").HandlerFunc(httpTraceHdrs(api.GetObjectHandler))
|
||||||
// CopyObject
|
// CopyObject
|
||||||
|
Loading…
Reference in New Issue
Block a user