|
|
|
@ -652,20 +652,19 @@ func (c *ldapConnector) groups(ctx context.Context, user ldap.Entry) ([]string, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
continue |
|
|
|
} else { |
|
|
|
} |
|
|
|
for _, attr := range c.getAttrs(user, matcher.UserAttr) { |
|
|
|
|
|
|
|
obtained, filter, err := c.queryGroups(ctx, matcher.GroupAttr, attr) |
|
|
|
for _, attr := range c.getAttrs(user, matcher.UserAttr) { |
|
|
|
if err != nil { |
|
|
|
obtained, filter, err := c.queryGroups(ctx, matcher.GroupAttr, attr) |
|
|
|
return nil, err |
|
|
|
if err != nil { |
|
|
|
} |
|
|
|
return nil, err |
|
|
|
gotGroups := len(obtained) != 0 |
|
|
|
} |
|
|
|
if !gotGroups { |
|
|
|
gotGroups := len(obtained) != 0 |
|
|
|
// TODO(ericchiang): Is this going to spam the logs?
|
|
|
|
if !gotGroups { |
|
|
|
c.logger.Error("ldap: groups search returned no groups", "filter", filter) |
|
|
|
// TODO(ericchiang): Is this going to spam the logs?
|
|
|
|
} |
|
|
|
c.logger.Error("ldap: groups search returned no groups", "filter", filter) |
|
|
|
groups = append(groups, obtained...) |
|
|
|
} |
|
|
|
} |
|
|
|
groups = append(groups, obtained...) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// If RecursionGroupAttr is not set, convert direct groups into names and return
|
|
|
|
// If RecursionGroupAttr is not set, convert direct groups into names and return
|
|
|
|
|