From 856a9bb420bb52ac7e3eed84f93874415d193623 Mon Sep 17 00:00:00 2001 From: Marc Aymerich Date: Mon, 10 Nov 2014 17:18:04 +0000 Subject: [PATCH] Fixed get_protections apache backend --- orchestra/apps/saas/services/wordpress.py | 2 +- orchestra/apps/saas/settings.py | 2 +- orchestra/apps/websites/backends/apache.py | 5 ++--- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/orchestra/apps/saas/services/wordpress.py b/orchestra/apps/saas/services/wordpress.py index 4f4f66c8..d3dd4c61 100644 --- a/orchestra/apps/saas/services/wordpress.py +++ b/orchestra/apps/saas/services/wordpress.py @@ -23,7 +23,7 @@ class WordPressForm(PluginDataForm): self.fields['site_name'].help_text = mark_safe(url) -class WordpressService(SoftwareService): +class WordPressService(SoftwareService): verbose_name = "WordPress" form = WordPressForm description_field = 'site_name' diff --git a/orchestra/apps/saas/settings.py b/orchestra/apps/saas/settings.py index bb782819..6cc78283 100644 --- a/orchestra/apps/saas/settings.py +++ b/orchestra/apps/saas/settings.py @@ -2,7 +2,7 @@ from django.conf import settings SAAS_ENABLED_SERVICES = getattr(settings, 'SAAS_ENABLED_SERVICES', ( - 'orchestra.apps.saas.services.wordpress.WordpressService', + 'orchestra.apps.saas.services.wordpress.WordPressService', 'orchestra.apps.saas.services.drupal.DrupalService', 'orchestra.apps.saas.services.dokuwiki.DokuwikiService', 'orchestra.apps.saas.services.moodle.MoodleService', diff --git a/orchestra/apps/websites/backends/apache.py b/orchestra/apps/websites/backends/apache.py index 544dcec6..c5b56863 100644 --- a/orchestra/apps/websites/backends/apache.py +++ b/orchestra/apps/websites/backends/apache.py @@ -137,11 +137,10 @@ class Apache2Backend(ServiceController): return directives def get_protections(self, site): - protections = "" - __, regex = settings.WEBSITES_OPTIONS['directory_protection'] + protections = '' context = self.get_context(site) for protection in site.options.filter(name='directory_protection'): - path, name, passwd = re.match(regex, protection.value).groups() + path, name, passwd = protection.value.split() path = os.path.join(context['root'], path) passwd = os.path.join(self.USER_HOME % context, passwd) protections += textwrap.dedent("""