1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/calibreweb_ynh.git synced 2024-09-03 18:16:20 +02:00

Change simpleldap username

This commit is contained in:
Krakinou 2020-04-13 19:29:12 +02:00
parent 0f7ae5b41d
commit 03c5ec75db
2 changed files with 13 additions and 1 deletions

View file

@ -2,7 +2,7 @@ config_login_type=1,
config_ldap_provider_url=\'localhost\', config_ldap_provider_url=\'localhost\',
config_ldap_port=389, config_ldap_port=389,
config_ldap_schema=\'ldap\', config_ldap_schema=\'ldap\',
config_ldap_serv_username=\'nicolas\', config_ldap_serv_username=\'cn=admin,dc=yunohost,dc=org\',
config_ldap_serv_password=\'eXVub2hvc3RfZGV2\', config_ldap_serv_password=\'eXVub2hvc3RfZGV2\',
config_ldap_dn=\'ou=users,dc=yunohost,dc=org\', config_ldap_dn=\'ou=users,dc=yunohost,dc=org\',
config_ldap_user_object=\'uid=%s\', config_ldap_user_object=\'uid=%s\',

View file

@ -0,0 +1,12 @@
--- a/cps/services/simpleldap.py 2020-02-23 09:08:01.000000000 +0100
+++ b/cps/services/simpleldap.py 2020-04-13 18:57:49.302535092 +0200
@@ -35,8 +35,7 @@
app.config['LDAP_HOST'] = config.config_ldap_provider_url
app.config['LDAP_PORT'] = config.config_ldap_port
app.config['LDAP_SCHEMA'] = config.config_ldap_schema
- app.config['LDAP_USERNAME'] = config.config_ldap_user_object.replace('%s', config.config_ldap_serv_username)\
- + ',' + config.config_ldap_dn
+ app.config['LDAP_USERNAME'] = config.config_ldap_serv_username
app.config['LDAP_PASSWORD'] = base64.b64decode(config.config_ldap_serv_password)
app.config['LDAP_REQUIRE_CERT'] = bool(config.config_ldap_require_cert)
if config.config_ldap_require_cert: