mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-python
synced 2026-01-15 09:53:32 +01:00
jwutils.ldap: Introduce 'password' alias for 'bind_pw'
jw-client-devops configures its databases with a set of config keys which are identical - except for the 'bind_pw' key, which is called 'password'. Allow that, too. Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
bc9fa57a2b
commit
c941ef307c
1 changed files with 4 additions and 1 deletions
|
|
@ -42,7 +42,10 @@ class Config:
|
|||
@property
|
||||
def bind_pw(self):
|
||||
if self.__bind_pw is None:
|
||||
ret = self.__get('bind_pw', default=None)
|
||||
for key in ['bind_pw', 'password']:
|
||||
ret = self.__get(key, default=None)
|
||||
if ret is not None:
|
||||
break
|
||||
if ret is None:
|
||||
ldap_secret_file = self.__get('secret_file', f'{pathlib.Path.home()}/.ldap.secret')
|
||||
with open(ldap_secret_file, 'r') as file:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue