mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-18 05:51:26 +02:00
Rename setting.
This commit is contained in:
@@ -188,8 +188,7 @@ class GeneralParametersForm(parameters.AdminParametersForm):
|
||||
"Members of those LDAP Posix groups will be created as domain "
|
||||
"administrators. Use ';' characters to separate groups."
|
||||
),
|
||||
required=False,
|
||||
widget=forms.TextInput(attrs={"class": "form-control"})
|
||||
required=False
|
||||
)
|
||||
|
||||
ldap_groups_search_base = forms.CharField(
|
||||
@@ -198,17 +197,7 @@ class GeneralParametersForm(parameters.AdminParametersForm):
|
||||
help_text=ugettext_lazy(
|
||||
"The distinguished name of the search base used to find groups"
|
||||
),
|
||||
required=False,
|
||||
widget=forms.TextInput(attrs={"class": "form-control"})
|
||||
)
|
||||
|
||||
ldap_create_domain_mailbox = YesNoField(
|
||||
label=ugettext_lazy("Domain/mailbox creation"),
|
||||
initial="yes",
|
||||
help_text=ugettext_lazy(
|
||||
"Automatically create a domain and a mailbox when a new user "
|
||||
"is created just after the first successful authentication."
|
||||
)
|
||||
required=False
|
||||
)
|
||||
|
||||
sep3 = SeparatorField(label=ugettext_lazy("Miscellaneous"))
|
||||
|
||||
@@ -205,7 +205,7 @@ def account_auto_created(user):
|
||||
from modoboa.extensions.admin.lib import check_if_domain_exists
|
||||
from modoboa.lib.permissions import grant_access_to_object
|
||||
|
||||
if parameters.get_admin("LDAP_CREATE_DOMAIN_MAILBOX", app="core") == "no":
|
||||
if parameters.get_admin("AUTO_CREATE_DOMAIN_AND_MAILBOX") == "no":
|
||||
return
|
||||
localpart, domname = split_mailbox(user.username)
|
||||
if user.group != 'SimpleUsers' and domname is None:
|
||||
|
||||
@@ -45,6 +45,15 @@ class AdminParametersForm(parameters.AdminParametersForm):
|
||||
"When a mailbox is removed, also remove the associated account")
|
||||
)
|
||||
|
||||
auto_create_domain_and_mailbox = YesNoField(
|
||||
label=ugettext_lazy("Automatic domain/mailbox creation"),
|
||||
initial="yes",
|
||||
help_text=ugettext_lazy(
|
||||
"Create a domain and a mailbox when an account is automatically "
|
||||
"created."
|
||||
)
|
||||
)
|
||||
|
||||
# Visibility rules
|
||||
visibility_rules = {
|
||||
"mailboxes_owner": "handle_mailboxes=yes",
|
||||
|
||||
Reference in New Issue
Block a user