Rename setting.

This commit is contained in:
Antoine Nguyen
2014-12-03 11:38:46 +01:00
parent 5f35a6fbb3
commit 67dff673f5
3 changed files with 12 additions and 14 deletions
+2 -13
View File
@@ -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"))
+1 -1
View File
@@ -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:
+9
View File
@@ -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",