@@ -128,20 +128,30 @@ class CrowdServer(object):
url = ("%s/rest/usermanagement/%s/user/group/nested?username=%s"
% (self._uri, self._version, urllib2.quote(username)))
return self._request(url)
class KallitheaAuthPlugin(auth_modules.KallitheaExternalAuthPlugin):
def __init__(self):
self._protocol_values = ["http", "https"]
@hybrid_property
def name(self):
return "crowd"
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",
"description": "The FQDN or IP of the Atlassian CROWD Server",
"default": "127.0.0.1",
"formname": "Host"
@@ -226,12 +226,13 @@ class TestAuthSettingsController(TestCon
params = self._enable_plugins('kallithea.lib.auth_modules.auth_internal,kallithea.lib.auth_modules.auth_crowd')
params.update({'auth_crowd_host': ' hostname ',
'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',
action='auth_settings')
response = self.app.post(url=test_url, params=params)
Status change: