Merge pull request #1769 from batara666/master

ldap.go: drop else on returned if block
This commit is contained in:
Márk Sági-Kazár 2020-09-16 17:47:52 +02:00 committed by GitHub
commit a64e7c2986
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -188,13 +188,13 @@ func parseScope(s string) (int, bool) {
func (c *ldapConnector) userMatchers() []UserMatcher {
if len(c.GroupSearch.UserMatchers) > 0 && c.GroupSearch.UserMatchers[0].UserAttr != "" {
return c.GroupSearch.UserMatchers[:]
} else {
return []UserMatcher{
{
UserAttr: c.GroupSearch.UserAttr,
GroupAttr: c.GroupSearch.GroupAttr,
},
}
}
return []UserMatcher{
{
UserAttr: c.GroupSearch.UserAttr,
GroupAttr: c.GroupSearch.GroupAttr,
},
}
}