mirror of
https://github.com/minio/minio.git
synced 2025-04-07 13:15:39 -04:00
Fix importIAM issue with importing implied policies (#20956)
This commit is contained in:
parent
ad4cbce22d
commit
39df134204
@ -2441,7 +2441,7 @@ func (a adminAPIHandlers) importIAM(w http.ResponseWriter, r *http.Request, apiV
|
||||
}
|
||||
var sp *policy.Policy
|
||||
var err error
|
||||
if len(svcAcctReq.SessionPolicy) > 0 {
|
||||
if len(svcAcctReq.SessionPolicy) > 0 && !bytes.Equal(svcAcctReq.SessionPolicy, []byte("null")) {
|
||||
sp, err = policy.ParseConfig(bytes.NewReader(svcAcctReq.SessionPolicy))
|
||||
if err != nil {
|
||||
writeErrorResponseJSON(ctx, w, importError(ctx, err, allSvcAcctsFile, user), r.URL)
|
||||
|
Loading…
x
Reference in New Issue
Block a user