mirror of
https://github.com/minio/minio.git
synced 2025-02-03 09:55:59 -05:00
Merge pull request #967 from harshavardhana/handle-readonly-buckets
acl: Handle readonly buckets properly
This commit is contained in:
commit
249c444e88
@ -41,10 +41,8 @@ func (api CloudStorageAPI) ListMultipartUploadsHandler(w http.ResponseWriter, re
|
|||||||
|
|
||||||
if !api.Anonymous {
|
if !api.Anonymous {
|
||||||
if isRequestRequiresACLCheck(req) {
|
if isRequestRequiresACLCheck(req) {
|
||||||
if api.Filesystem.IsPrivateBucket(bucket) {
|
writeErrorResponse(w, req, AccessDenied, req.URL.Path)
|
||||||
writeErrorResponse(w, req, AccessDenied, req.URL.Path)
|
return
|
||||||
return
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -127,7 +127,7 @@ func (api CloudStorageAPI) PutObjectHandler(w http.ResponseWriter, req *http.Req
|
|||||||
|
|
||||||
if !api.Anonymous {
|
if !api.Anonymous {
|
||||||
if isRequestRequiresACLCheck(req) {
|
if isRequestRequiresACLCheck(req) {
|
||||||
if api.Filesystem.IsPrivateBucket(bucket) {
|
if api.Filesystem.IsPrivateBucket(bucket) || api.Filesystem.IsReadOnlyBucket(bucket) {
|
||||||
writeErrorResponse(w, req, AccessDenied, req.URL.Path)
|
writeErrorResponse(w, req, AccessDenied, req.URL.Path)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -512,7 +512,7 @@ func (api CloudStorageAPI) DeleteObjectHandler(w http.ResponseWriter, req *http.
|
|||||||
|
|
||||||
if !api.Anonymous {
|
if !api.Anonymous {
|
||||||
if isRequestRequiresACLCheck(req) {
|
if isRequestRequiresACLCheck(req) {
|
||||||
if api.Filesystem.IsPrivateBucket(bucket) {
|
if api.Filesystem.IsPrivateBucket(bucket) || api.Filesystem.IsReadOnlyBucket(bucket) {
|
||||||
writeErrorResponse(w, req, AccessDenied, req.URL.Path)
|
writeErrorResponse(w, req, AccessDenied, req.URL.Path)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user