Browse Source

fix: suppress deprecation warning for userAttr when not set (#4539)

Signed-off-by: maksim.nabokikh <max.nabokih@gmail.com>
pull/4536/head
Maksim Nabokikh 1 month ago committed by GitHub
parent
commit
489e37d07a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  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