support 'ldap:user' variable replacement properly (#10391)

also update `ldap.go` examples with latest
minio-go changes

Fixes #10367
This commit is contained in:
Harshavardhana
2020-08-31 23:56:22 -07:00
committed by GitHub
parent 9ffad7fceb
commit 4b6585d249
4 changed files with 36 additions and 26 deletions

View File

@@ -151,9 +151,10 @@ func getConditionValues(r *http.Request, lc string, username string, claims map[
if ok {
// Special case for AD/LDAP STS users
if k == ldapUser {
args[ldapUserPolicyVariable] = []string{vStr}
args["user"] = []string{vStr}
} else {
args[k] = []string{vStr}
}
args[k] = []string{vStr}
}
}