Fixed get_protections apache backend
This commit is contained in:
parent
813cfb6f65
commit
856a9bb420
|
@ -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'
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -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("""
|
||||
|
|
Loading…
Reference in New Issue