refactor: put the auth outside (#5313)

This commit is contained in:
7y-9
2024-02-19 19:07:48 +08:00
committed by GitHub
parent f037c09c11
commit 41ec9d7759
2 changed files with 2 additions and 8 deletions

View File

@@ -123,13 +123,6 @@ func (s3a *S3ApiServer) PutBucketHandler(w http.ResponseWriter, r *http.Request)
return
}
if s3a.iam.isEnabled() {
if _, errCode = s3a.iam.authRequest(r, s3_constants.ACTION_ADMIN); errCode != s3err.ErrNone {
s3err.WriteErrorResponse(w, r, errCode)
return
}
}
fn := func(entry *filer_pb.Entry) {
if identityId := r.Header.Get(s3_constants.AmzIdentityId); identityId != "" {
if entry.Extended == nil {