diff --git a/kallithea/lib/auth_modules/auth_crowd.py b/kallithea/lib/auth_modules/auth_crowd.py --- a/kallithea/lib/auth_modules/auth_crowd.py +++ b/kallithea/lib/auth_modules/auth_crowd.py @@ -131,6 +131,8 @@ class CrowdServer(object): class KallitheaAuthPlugin(auth_modules.KallitheaExternalAuthPlugin): + def __init__(self): + self._protocol_values = ["http", "https"] @hybrid_property def name(self): @@ -139,6 +141,14 @@ class KallitheaAuthPlugin(auth_modules.K def settings(self): settings = [ { + "name": "method", + "validator": self.validators.OneOf(self._protocol_values), + "type": "select", + "values": self._protocol_values, + "description": "The protocol used to connect to the Atlassian CROWD server.", + "formname": "Protocol" + }, + { "name": "host", "validator": self.validators.UnicodeString(strip=True), "type": "string", diff --git a/kallithea/tests/functional/test_admin_auth_settings.py b/kallithea/tests/functional/test_admin_auth_settings.py --- a/kallithea/tests/functional/test_admin_auth_settings.py +++ b/kallithea/tests/functional/test_admin_auth_settings.py @@ -229,6 +229,7 @@ class TestAuthSettingsController(TestCon 'auth_crowd_app_password': 'secret', 'auth_crowd_admin_groups': 'mygroup', 'auth_crowd_port': '123', + 'auth_crowd_method': 'https', 'auth_crowd_app_name': 'xyzzy'}) test_url = url(controller='admin/auth_settings',