Browse Source

fix: When there is no access permission configured before startup, the authentication does not take effect after configuring the permission after startup

pull/3169/head
shichanglin5 3 years ago
parent
commit
f01dd27752
  1. 6
      weed/s3api/auth_credentials.go

6
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 {
return func(w http.ResponseWriter, r *http.Request) {
if !iam.isEnabled() {
return f
f(w, r)
return
}
return func(w http.ResponseWriter, r *http.Request) {
identity, errCode := iam.authRequest(r, action)
if errCode == s3err.ErrNone {
if identity != nil && identity.Name != "" {

Loading…
Cancel
Save