From 668d4de77a1ad4a8ba18b5c87ee6ad399c60ef5d Mon Sep 17 00:00:00 2001 From: Joseph Nuthalapati Date: Thu, 28 Feb 2019 13:45:30 +0530 Subject: [PATCH] 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 Reviewed-by: Sunil Mohan Adapa --- actions/matrixsynapse | 2 +- plinth/modules/matrixsynapse/__init__.py | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/actions/matrixsynapse b/actions/matrixsynapse index 1db9cd8ed..48e60df8a 100755 --- a/actions/matrixsynapse +++ b/actions/matrixsynapse @@ -146,7 +146,7 @@ def subcommand_post_install(_): 'attributes': { 'uid': 'uid', 'name': 'uid', - 'mail': None + 'mail': '' } } config['password_providers'][0]['config'] = ldap_config diff --git a/plinth/modules/matrixsynapse/__init__.py b/plinth/modules/matrixsynapse/__init__.py index 83988acd0..08ecec694 100644 --- a/plinth/modules/matrixsynapse/__init__.py +++ b/plinth/modules/matrixsynapse/__init__.py @@ -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')