diff options
| author | Chris Lu <chrislusf@users.noreply.github.com> | 2022-06-12 23:40:42 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-06-12 23:40:42 -0700 |
| commit | b22ca85fbb674c445096b739af142dbf53dbd72b (patch) | |
| tree | d745c7edc976eaf9026166ef592307edd8bb002c /weed | |
| parent | e437ec5a685e1bb906e7a61547c59dd6227a11a9 (diff) | |
| parent | f01dd27752c507bc99013da4502c12877aaeff26 (diff) | |
| download | seaweedfs-b22ca85fbb674c445096b739af142dbf53dbd72b.tar.xz seaweedfs-b22ca85fbb674c445096b739af142dbf53dbd72b.zip | |
Merge pull request #3169 from shichanglin5/fix_auth
fix: When there is no access permission configured before startup, th…
Diffstat (limited to 'weed')
| -rw-r--r-- | weed/s3api/auth_credentials.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/weed/s3api/auth_credentials.go b/weed/s3api/auth_credentials.go index 757e3ddd9..fb23d9ce9 100644 --- a/weed/s3api/auth_credentials.go +++ b/weed/s3api/auth_credentials.go @@ -176,12 +176,12 @@ func (iam *IdentityAccessManagement) lookupAnonymous() (identity *Identity, foun } func (iam *IdentityAccessManagement) Auth(f http.HandlerFunc, action Action) http.HandlerFunc { - - if !iam.isEnabled() { - return f - } - return func(w http.ResponseWriter, r *http.Request) { + if !iam.isEnabled() { + f(w, r) + return + } + identity, errCode := iam.authRequest(r, action) if errCode == s3err.ErrNone { if identity != nil && identity.Name != "" { |
