mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-07-16 15:16:28 +08:00
check auth only when enabled
This commit is contained in:
parent
3c245c69d3
commit
35c37562bc
@ -111,9 +111,11 @@ func (s3a *S3ApiServer) PutBucketHandler(w http.ResponseWriter, r *http.Request)
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if _, errCode = s3a.iam.authRequest(r, s3_constants.ACTION_ADMIN); errCode != s3err.ErrNone {
|
if s3a.iam.isEnabled() {
|
||||||
s3err.WriteErrorResponse(w, r, errCode)
|
if _, errCode = s3a.iam.authRequest(r, s3_constants.ACTION_ADMIN); errCode != s3err.ErrNone {
|
||||||
return
|
s3err.WriteErrorResponse(w, r, errCode)
|
||||||
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn := func(entry *filer_pb.Entry) {
|
fn := func(entry *filer_pb.Entry) {
|
||||||
|
Loading…
Reference in New Issue
Block a user