Do not lowercase groups attached to users in ldap (#2613)

This commit is contained in:
Chris Hoffman 2017-04-19 10:36:45 -04:00 committed by GitHub
parent 6b55ab5db0
commit c4cc3fd96e

View File

@ -101,7 +101,7 @@ func (b *backend) pathUserRead(
func (b *backend) pathUserWrite(
req *logical.Request, d *framework.FieldData) (*logical.Response, error) {
name := d.Get("name").(string)
groups := strutil.ParseDedupAndSortStrings(d.Get("groups").(string), ",")
groups := strutil.RemoveDuplicates(strutil.ParseStringSlice(d.Get("groups").(string), ","), false)
policies := policyutil.ParsePolicies(d.Get("policies").(string))
for i, g := range groups {
groups[i] = strings.TrimSpace(g)