mirror of
https://github.com/minio/minio.git
synced 2024-12-23 21:55:53 -05:00
policy: Fix a typo when validating the list of policies (#13735)
When assigning two policies to a user using mc command, the server code wrongly validates due to a typo in the code, the commit fixes it.
This commit is contained in:
parent
3b5d6f003f
commit
d1bfb4d2c0
@ -805,7 +805,7 @@ func (store *IAMStoreSys) PolicyDBSet(ctx context.Context, name, policy string,
|
||||
// Handle policy mapping set/update
|
||||
mp := newMappedPolicy(policy)
|
||||
for _, p := range mp.toSlice() {
|
||||
if _, found := cache.iamPolicyDocsMap[policy]; !found {
|
||||
if _, found := cache.iamPolicyDocsMap[p]; !found {
|
||||
logger.LogIf(GlobalContext, fmt.Errorf("%w: (%s)", errNoSuchPolicy, p))
|
||||
return errNoSuchPolicy
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user