mirror of
https://github.com/minio/minio.git
synced 2024-12-24 22:25:54 -05:00
allow detaching any non-normalized DN (#19525)
This commit is contained in:
parent
73b4794cf7
commit
a8d601b64a
13
cmd/iam.go
13
cmd/iam.go
@ -1770,6 +1770,19 @@ func (sys *IAMSys) PolicyDBUpdateLDAP(ctx context.Context, isAttach bool,
|
||||
isGroup = true
|
||||
}
|
||||
|
||||
// Backward compatibility in detaching non-normalized DNs.
|
||||
if !isAttach {
|
||||
var oldDN string
|
||||
if isGroup {
|
||||
oldDN = r.Group
|
||||
} else {
|
||||
oldDN = r.User
|
||||
}
|
||||
if oldDN != dn {
|
||||
sys.store.PolicyDBUpdate(ctx, oldDN, isGroup, stsUser, r.Policies, isAttach)
|
||||
}
|
||||
}
|
||||
|
||||
userType := stsUser
|
||||
updatedAt, addedOrRemoved, effectivePolicies, err = sys.store.PolicyDBUpdate(
|
||||
ctx, dn, isGroup, userType, r.Policies, isAttach)
|
||||
|
Loading…
Reference in New Issue
Block a user