Skip to content

Commit

Permalink
Fix LDAP binding with old core
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidePrincipi committed Jan 25, 2024
1 parent dc83fb1 commit cfa07a9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions imageroot/update-module.d/50bind_user_domain
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ except:
if not user_ldap_domain:
sys.exit(0)

if not hasattr(agent, 'get_bound_domain_list'):
sys.exit(0) # core version too old, skip and try on next update

rdb = agent.redis_connect(use_replica=True)
if not agent.get_bound_domain_list(rdb):
agent.bind_user_domains([user_ldap_domain])

0 comments on commit cfa07a9

Please sign in to comment.