Browse Source

fix: suppress deprecation warning for userAttr when not set

Signed-off-by: maksim.nabokikh <max.nabokih@gmail.com>
pull/4539/head
maksim.nabokikh 1 month ago
parent
commit
afe3f33805
  1. 4
      connector/ldap/ldap.go

4
connector/ldap/ldap.go

@ -198,7 +198,9 @@ func userMatchers(c *Config, logger *slog.Logger) []UserMatcher {
return c.GroupSearch.UserMatchers
}
logger.Warn(`use "groupSearch.userMatchers" option instead of "userAttr/groupAttr" fields`, "deprecated", true)
if c.GroupSearch.UserAttr != "" || c.GroupSearch.GroupAttr != "" {
logger.Warn(`use "groupSearch.userMatchers" option instead of "userAttr/groupAttr" fields`, "deprecated", true)
}
return []UserMatcher{
{
UserAttr: c.GroupSearch.UserAttr,

Loading…
Cancel
Save