matrix-synapse: Fix LDAP login issue

Pass the `mail` attribute as an empty string instead of None (null in yaml)

Fixes #1484

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
Joseph Nuthalapati 2019-02-28 13:45:30 +05:30 committed by Sunil Mohan Adapa
parent ec68eb3d89
commit 668d4de77a
No known key found for this signature in database
GPG Key ID: 43EA1CFF0AA7C5F2
2 changed files with 5 additions and 4 deletions

View File

@ -146,7 +146,7 @@ def subcommand_post_install(_):
'attributes': {
'uid': 'uid',
'name': 'uid',
'mail': None
'mail': ''
}
}
config['password_providers'][0]['config'] = ldap_config

View File

@ -26,13 +26,13 @@ from django.urls import reverse_lazy
from django.utils.translation import ugettext_lazy as _
from ruamel.yaml.util import load_yaml_guess_indent
from plinth import service as service_module
from plinth import action_utils, actions, frontpage
from plinth import service as service_module
from plinth.menu import main_menu
from .manifest import backup, clients
version = 4
version = 5
managed_services = ['matrix-synapse']
@ -164,5 +164,6 @@ def get_public_registration_status():
def has_valid_certificate():
"""Return whether the configured domain name has a valid certificate."""
status = actions.superuser_run('matrixsynapse', ['letsencrypt', 'get-status'])
status = actions.superuser_run('matrixsynapse',
['letsencrypt', 'get-status'])
return status.startswith('valid')