mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-05-20 10:34:30 +00:00
ejabberd: Revert changes to always keep localhost (aa5b1cea126d37)
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
parent
15038ae24c
commit
e4f8a7942f
@ -213,7 +213,6 @@ def set_domains(domains):
|
|||||||
if not domains or app.needs_setup():
|
if not domains or app.needs_setup():
|
||||||
return
|
return
|
||||||
|
|
||||||
domains = list(set(domains) | {'localhost'})
|
|
||||||
commands = ['set-domains', '--domains']
|
commands = ['set-domains', '--domains']
|
||||||
commands.extend(domains)
|
commands.extend(domains)
|
||||||
actions.superuser_run('ejabberd', commands)
|
actions.superuser_run('ejabberd', commands)
|
||||||
|
|||||||
@ -7,7 +7,6 @@ from django import forms
|
|||||||
from django.urls import reverse_lazy
|
from django.urls import reverse_lazy
|
||||||
from django.utils.translation import gettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
|
|
||||||
import plinth.forms
|
|
||||||
from plinth import cfg
|
from plinth import cfg
|
||||||
from plinth.modules import ejabberd
|
from plinth.modules import ejabberd
|
||||||
from plinth.modules.coturn.forms import turn_uris_validator
|
from plinth.modules.coturn.forms import turn_uris_validator
|
||||||
@ -17,8 +16,8 @@ from plinth.utils import format_lazy
|
|||||||
class EjabberdForm(forms.Form):
|
class EjabberdForm(forms.Form):
|
||||||
"""Ejabberd configuration form."""
|
"""Ejabberd configuration form."""
|
||||||
domain_names = forms.MultipleChoiceField(
|
domain_names = forms.MultipleChoiceField(
|
||||||
label=_('Domain names'),
|
label=_('Domain names'), widget=forms.CheckboxSelectMultiple,
|
||||||
widget=plinth.forms.CheckboxSelectMultipleWithReadOnly, help_text=_(
|
help_text=_(
|
||||||
'Domains to be used by ejabberd. Note that user accounts are '
|
'Domains to be used by ejabberd. Note that user accounts are '
|
||||||
'unique for each domain, and migrating users to a new domain name '
|
'unique for each domain, and migrating users to a new domain name '
|
||||||
'is not yet implemented.'), choices=[])
|
'is not yet implemented.'), choices=[])
|
||||||
@ -62,15 +61,7 @@ class EjabberdForm(forms.Form):
|
|||||||
from plinth.modules.names.components import DomainName
|
from plinth.modules.names.components import DomainName
|
||||||
domains |= DomainName.list_names()
|
domains |= DomainName.list_names()
|
||||||
|
|
||||||
choices = []
|
self.fields['domain_names'].choices = zip(domains, domains)
|
||||||
for domain in domains:
|
|
||||||
label = domain
|
|
||||||
if domain == 'localhost':
|
|
||||||
label = {'label': domain, 'disabled': True}
|
|
||||||
|
|
||||||
choices.append((domain, label))
|
|
||||||
|
|
||||||
self.fields['domain_names'].choices = choices
|
|
||||||
|
|
||||||
def clean_turn_uris(self):
|
def clean_turn_uris(self):
|
||||||
"""Normalize newlines in URIs."""
|
"""Normalize newlines in URIs."""
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user