Merge pull request #1769 from batara666/master
ldap.go: drop else on returned if block
This commit is contained in:
commit
a64e7c2986
@ -188,7 +188,8 @@ func parseScope(s string) (int, bool) {
|
|||||||
func (c *ldapConnector) userMatchers() []UserMatcher {
|
func (c *ldapConnector) userMatchers() []UserMatcher {
|
||||||
if len(c.GroupSearch.UserMatchers) > 0 && c.GroupSearch.UserMatchers[0].UserAttr != "" {
|
if len(c.GroupSearch.UserMatchers) > 0 && c.GroupSearch.UserMatchers[0].UserAttr != "" {
|
||||||
return c.GroupSearch.UserMatchers[:]
|
return c.GroupSearch.UserMatchers[:]
|
||||||
} else {
|
}
|
||||||
|
|
||||||
return []UserMatcher{
|
return []UserMatcher{
|
||||||
{
|
{
|
||||||
UserAttr: c.GroupSearch.UserAttr,
|
UserAttr: c.GroupSearch.UserAttr,
|
||||||
@ -196,7 +197,6 @@ func (c *ldapConnector) userMatchers() []UserMatcher {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Open returns an authentication strategy using LDAP.
|
// Open returns an authentication strategy using LDAP.
|
||||||
func (c *Config) Open(id string, logger log.Logger) (connector.Connector, error) {
|
func (c *Config) Open(id string, logger log.Logger) (connector.Connector, error) {
|
||||||
|
Reference in New Issue
Block a user