mirror of
https://github.com/minio/minio.git
synced 2025-01-11 15:03:22 -05:00
Fix IAM users migration regression (#8008)
This commit is contained in:
parent
d966d29fed
commit
4101d4917c
@ -264,6 +264,8 @@ func loadUser(objectAPI ObjectLayer, user string, isSTS bool,
|
||||
return nil
|
||||
}
|
||||
|
||||
// In some cases access key may not be set, so we set it explicitly.
|
||||
u.Credentials.AccessKey = user
|
||||
m[user] = u.Credentials
|
||||
return nil
|
||||
}
|
||||
@ -573,6 +575,7 @@ func migrateUsersConfigToV1(objAPI ObjectLayer, isSTS bool) error {
|
||||
|
||||
// Found a id file in old format. Copy value
|
||||
// into new format and save it.
|
||||
cred.AccessKey = user
|
||||
u := newUserIdentity(cred)
|
||||
if err := saveIAMConfigItem(objAPI, u, identityPath); err != nil {
|
||||
logger.LogIf(context.Background(), err)
|
||||
@ -799,6 +802,7 @@ func (sys *IAMSys) Init(objAPI ObjectLayer) error {
|
||||
}
|
||||
break
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user