Server IP : 85.214.239.14 / Your IP : 13.59.1.58 Web Server : Apache/2.4.62 (Debian) System : Linux h2886529.stratoserver.net 4.9.0 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.18 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, MySQL : OFF | cURL : OFF | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /srv/modoboa/env/lib/python3.5/site-packages/modoboa/limits/ |
Upload File : |
"""Custom settings.""" from django import forms from django.utils.translation import ugettext_lazy as _ from modoboa.lib.form_utils import SeparatorField, YesNoField from modoboa.parameters import forms as param_forms class ParametersForm(param_forms.AdminParametersForm): """Available admin parameters.""" app = "limits" defv_sep = SeparatorField(label=_("Default per-admin limits")) enable_admin_limits = YesNoField( label=_("Enable per-admin limits"), initial=True, help_text=_("Enable or disable per-admin limits") ) deflt_user_domain_admins_limit = forms.IntegerField( label=_("Domain admins"), initial=0, help_text=_( "Maximum number of allowed domain administrators for a new " "administrator. (0 to deny any creation, -1 to allow unlimited " "creations)" ), widget=forms.widgets.TextInput( attrs={"class": "col-md-1 form-control"}) ) deflt_user_domains_limit = forms.IntegerField( label=_("Domains"), initial=0, help_text=_( "Maximum number of allowed domains for a new administrator. " "(0 to deny any creation, -1 to allow unlimited creations)" ), widget=forms.widgets.TextInput( attrs={"class": "col-md-1 form-control"}) ) deflt_user_domain_aliases_limit = forms.IntegerField( label=_("Domain aliases"), initial=0, help_text=_( "Maximum number of allowed domain aliases for a new " "administrator. (0 to deny any creation, -1 to allow " "unlimited creations)" ), widget=forms.widgets.TextInput( attrs={"class": "col-md-1 form-control"}) ) deflt_user_mailboxes_limit = forms.IntegerField( label=_("Mailboxes"), initial=0, help_text=_( "Maximum number of allowed mailboxes for a new administrator. " "(0 to deny any creation, -1 to allow unlimited creations)" ), widget=forms.widgets.TextInput( attrs={"class": "col-md-1 form-control"}) ) deflt_user_mailbox_aliases_limit = forms.IntegerField( label=_("Mailbox aliases"), initial=0, help_text=_( "Maximum number of allowed aliases for a new administrator. " "(0 to deny any creation, -1 to allow unlimited creations)" ), widget=forms.widgets.TextInput( attrs={"class": "col-md-1 form-control"}) ) deflt_user_quota_limit = forms.IntegerField( label=_("Quota"), initial=0, help_text=_( "The quota a reseller will be allowed to share between the " "domains he creates. (0 means no quota)" ), widget=forms.widgets.TextInput( attrs={"class": "col-md-1 form-control"}) ) domain_limits_sep = SeparatorField(label=_("Default per-domain limits")) enable_domain_limits = YesNoField( label=_("Enable per-domain limits"), initial=False, help_text=_("Enable or disable per-domain limits") ) deflt_domain_domain_admins_limit = forms.IntegerField( label=_("Domain admins"), initial=0, help_text=_( "Maximum number of allowed domain administrators for a new " "domain. (0 to deny any creation, -1 to allow unlimited " "creations)" ), widget=forms.widgets.TextInput( attrs={"class": "col-md-1 form-control"}) ) deflt_domain_domain_aliases_limit = forms.IntegerField( label=_("Domain aliases"), initial=0, help_text=_( "Maximum number of allowed domain aliases for a new " "domain. (0 to deny any creation, -1 to allow " "unlimited creations)" ), widget=forms.widgets.TextInput( attrs={"class": "col-md-1 form-control"}) ) deflt_domain_mailboxes_limit = forms.IntegerField( label=_("Mailboxes"), initial=0, help_text=_( "Maximum number of allowed mailboxes for a new domain. " "(0 to deny any creation, -1 to allow unlimited creations)" ), widget=forms.widgets.TextInput( attrs={"class": "col-md-1 form-control"}) ) deflt_domain_mailbox_aliases_limit = forms.IntegerField( label=_("Mailbox aliases"), initial=0, help_text=_( "Maximum number of allowed aliases for a new domain. " "(0 to deny any creation, -1 to allow unlimited creations)" ), widget=forms.widgets.TextInput( attrs={"class": "col-md-1 form-control"}) ) visibility_rules = { "deflt_user_domains_limit": "enable_admin_limits=True", "deflt_user_domain_aliases_limit": "enable_admin_limits=True", "deflt_user_mailboxes_limit": "enable_admin_limits=True", "deflt_user_mailbox_aliases_limit": "enable_admin_limits=True", "deflt_user_domain_admins_limit": "enable_admin_limits=True", "deflt_domain_mailboxes_limit": "enable_domain_limits=True", "deflt_domain_mailbox_aliases_limit": "enable_domain_limits=True", "deflt_domain_domain_aliases_limit": "enable_domain_limits=True", "deflt_domain_domain_admins_limit": "enable_domain_limits=True", }