mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
force overwrite s3-is-admin
https://github.com/chrislusf/seaweedfs/issues/2433
This commit is contained in:
parent
b0b2a03ea7
commit
42f4aa824b
|
@ -187,6 +187,8 @@ func (iam *IdentityAccessManagement) Auth(f http.HandlerFunc, action Action) htt
|
||||||
r.Header.Set(xhttp.AmzIdentityId, identity.Name)
|
r.Header.Set(xhttp.AmzIdentityId, identity.Name)
|
||||||
if identity.isAdmin() {
|
if identity.isAdmin() {
|
||||||
r.Header.Set(xhttp.AmzIsAdmin, "true")
|
r.Header.Set(xhttp.AmzIsAdmin, "true")
|
||||||
|
} else if _, ok := r.Header[xhttp.AmzIsAdmin]; ok {
|
||||||
|
r.Header.Del(xhttp.AmzIsAdmin)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
f(w, r)
|
f(w, r)
|
||||||
|
|
Loading…
Reference in a new issue