Skip to content

Commit 489e37d

Browse files
authored
fix: suppress deprecation warning for userAttr when not set (#4539)
Signed-off-by: maksim.nabokikh <max.nabokih@gmail.com>
1 parent 76d7ed4 commit 489e37d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

connector/ldap/ldap.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,9 @@ func userMatchers(c *Config, logger *slog.Logger) []UserMatcher {
198198
return c.GroupSearch.UserMatchers
199199
}
200200

201-
logger.Warn(`use "groupSearch.userMatchers" option instead of "userAttr/groupAttr" fields`, "deprecated", true)
201+
if c.GroupSearch.UserAttr != "" || c.GroupSearch.GroupAttr != "" {
202+
logger.Warn(`use "groupSearch.userMatchers" option instead of "userAttr/groupAttr" fields`, "deprecated", true)
203+
}
202204
return []UserMatcher{
203205
{
204206
UserAttr: c.GroupSearch.UserAttr,

0 commit comments

Comments
 (0)