diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE/Bug_Report.md similarity index 52% rename from .github/ISSUE_TEMPLATE.md rename to .github/ISSUE_TEMPLATE/Bug_Report.md index b1c69ef2f..166f7db16 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE/Bug_Report.md @@ -1,8 +1,16 @@ +--- +name: 'Bug Report' +about: 'Report a reproducible bug in the software.' +title: '' +labels: '' +assignees: '' +--- + # Impacted versions * OS Type: Debian/Ubuntu, Centos/Redhat, Arch, Gentoo, Slack, ... * OS Version: Number or Name -* Database Type: PostgreSQL/MySQL +* Database Type: PostgreSQL / MySQL * Database version: X.y * Modoboa: X.X.x * installer used: Yes/No ? @@ -12,6 +20,13 @@ # Current behavior + + # Expected behavior # Video/Screenshot link (optional) diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 000000000..5db193d51 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,8 @@ +blank_issues_enabled: false +contact_links: + - name: Modoboa Support + url: https://github.com/modoboa/modoboa/discussions + about: Please ask and answer questions here. + - name: Sponsoring + ur: https://modoboa.org/en/sponsoring/ + about: You love Modoboa and want to sponsor it diff --git a/.github/workflows/modoboa.yml b/.github/workflows/modoboa.yml index cfd765302..37be44fae 100644 --- a/.github/workflows/modoboa.yml +++ b/.github/workflows/modoboa.yml @@ -66,7 +66,9 @@ jobs: python-version: ${{ matrix.python-version }} - name: Install dependencies run: | - sudo apt-get install postfix librrd-dev rrdtool libldap2-dev libsasl2-dev libssl-dev + sudo apt-get update -y \ + && sudo apt-get install -y \ + postfix librrd-dev rrdtool libldap2-dev libsasl2-dev libssl-dev python -m pip install --upgrade pip pip install -r requirements.txt pip install -r ldap-requirements.txt diff --git a/doc/manual_installation/modoboa.rst b/doc/manual_installation/modoboa.rst index 90ba53228..1dfe0f6e6 100644 --- a/doc/manual_installation/modoboa.rst +++ b/doc/manual_installation/modoboa.rst @@ -183,6 +183,9 @@ you just have to run the following command: A database url should meet the following syntax ``://[user:pass@][host:port]/dbname`` **OR** ``sqlite:////full/path/to/your/database/file.sqlite``. + + Fox example, if you were using postgres, you could setup your command like this: + ``modoboa-admin.py deploy instance_name --collectstatic --domain example.com --dburl default:postgres://user:pass@[localhost]/modoboa`` The command will ask you a few questions, answer them and you're done. diff --git a/modoboa/admin/forms/account.py b/modoboa/admin/forms/account.py index f2ca42690..51d246480 100644 --- a/modoboa/admin/forms/account.py +++ b/modoboa/admin/forms/account.py @@ -206,9 +206,8 @@ class AccountFormGeneral(forms.ModelForm): account.role = self.cleaned_data["role"] if hasattr(account, "mailbox"): # Update forward status according to account status - models.Alias.objects.filter( - address=account.email, internal=False).update( - enabled=account.is_active) + models.Alias.objects.filter(address=account.email).update( + enabled=account.is_active) return account diff --git a/modoboa/admin/tests/test_account.py b/modoboa/admin/tests/test_account.py index 4eb722c45..0c4bb27e7 100644 --- a/modoboa/admin/tests/test_account.py +++ b/modoboa/admin/tests/test_account.py @@ -119,8 +119,10 @@ class AccountTestCase(ModoTestCase): account = User.objects.get(username=values["username"]) self.assertEqual(account.language, "fr") - def test_forward_updated_on_edit(self): + def test_aliases_update_on_disable(self): + """Check if aliases are updated when account is disabled.""" account = User.objects.get(username="user@test.com") + internal = models.Alias.objects.get(address=account.email, internal=True) forward = models.Alias.objects.create(address=account.email, internal=False) values = { "username": "user@test.com", @@ -133,12 +135,16 @@ class AccountTestCase(ModoTestCase): self.ajax_post( reverse("admin:account_change", args=[account.id]), values ) + internal.refresh_from_db() + self.assertFalse(internal.enabled) forward.refresh_from_db() self.assertFalse(forward.enabled) values["is_active"] = True self.ajax_post( reverse("admin:account_change", args=[account.id]), values ) + internal.refresh_from_db() + self.assertTrue(internal.enabled) forward.refresh_from_db() self.assertTrue(forward.enabled) diff --git a/modoboa/ldapsync/locale/zh_CN/LC_MESSAGES/django.po b/modoboa/ldapsync/locale/zh_CN/LC_MESSAGES/django.po new file mode 100644 index 000000000..d8c7f23d3 --- /dev/null +++ b/modoboa/ldapsync/locale/zh_CN/LC_MESSAGES/django.po @@ -0,0 +1,38 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# 李 正 <364109980@qq.com>, 2021 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-05-06 13:15+0200\n" +"PO-Revision-Date: 2020-05-11 18:45+0000\n" +"Last-Translator: 李 正 <364109980@qq.com>, 2021\n" +"Language-Team: Chinese (China) (https://www.transifex.com/tonio/teams/13749/zh_CN/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: zh_CN\n" +"Plural-Forms: nplurals=1; plural=0;\n" + +#: ldapsync/lib.py:84 +msgid "Failed to create LDAP account: {}" +msgstr "无法创建LDAP帐户: {}" + +#: ldapsync/lib.py:124 +msgid "Failed to update LDAP account: {}" +msgstr "无法更新LDAP帐户: {}" + +#: ldapsync/lib.py:138 +msgid "Failed to delete LDAP account: {}" +msgstr "无法删除LDAP帐户: {}" + +#: ldapsync/lib.py:149 +msgid "Failed to disable LDAP account: {}" +msgstr "无法关闭LDAP帐户: {}" diff --git a/modoboa/locale/de/LC_MESSAGES/djangojs.po b/modoboa/locale/de/LC_MESSAGES/djangojs.po index 3cfc96ec9..4eb8389b6 100644 --- a/modoboa/locale/de/LC_MESSAGES/djangojs.po +++ b/modoboa/locale/de/LC_MESSAGES/djangojs.po @@ -5,15 +5,16 @@ # # Translators: # Antoine Nguyen , 2020 +# Nicolas John, 2020 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-03-09 16:48+0100\n" +"POT-Creation-Date: 2020-11-05 15:47+0100\n" "PO-Revision-Date: 2020-05-11 18:45+0000\n" -"Last-Translator: Antoine Nguyen , 2020\n" +"Last-Translator: Nicolas John, 2020\n" "Language-Team: German (https://www.transifex.com/tonio/teams/13749/de/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -41,7 +42,7 @@ msgstr "Warnung" msgid "Cancel" msgstr "Abbrechen" -#: static/js/global.js:342 +#: static/js/global.js:347 msgid "Internal error" msgstr "Interner Fehler" @@ -56,3 +57,11 @@ msgstr "Suche" #: static/js/searchbar.js:28 msgid "Search..." msgstr "Suchen..." + +#: static/js/twocols_nav.js:170 +msgid "Are you sure?" +msgstr "Sind Sie sicher?" + +#: static/js/twocols_nav.js:171 +msgid "This will invalidate your registered application." +msgstr "Dadurch wird Ihre registrierte Anwendung ungültig." diff --git a/modoboa/locale/zh_CN/LC_MESSAGES/djangojs.po b/modoboa/locale/zh_CN/LC_MESSAGES/djangojs.po new file mode 100644 index 000000000..2c9fa073a --- /dev/null +++ b/modoboa/locale/zh_CN/LC_MESSAGES/djangojs.po @@ -0,0 +1,66 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# 李 正 <364109980@qq.com>, 2021 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-11-05 15:47+0100\n" +"PO-Revision-Date: 2020-05-11 18:45+0000\n" +"Last-Translator: 李 正 <364109980@qq.com>, 2021\n" +"Language-Team: Chinese (China) (https://www.transifex.com/tonio/teams/13749/zh_CN/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: zh_CN\n" +"Plural-Forms: nplurals=1; plural=0;\n" + +#: bower_components/jquery-ui/jquery-ui.min.js:8 +msgid "'" +msgstr "'" + +#: bower_components/swagger-ui/dist/swagger-ui-bundle.js:133 +msgid "operation" +msgstr "操作" + +#: core/static/core/js/settings.js:16 +msgid "No more log entry to show" +msgstr "没有更多的日志可以显示" + +#: static/js/confirmation.js:44 +msgid "Warning" +msgstr "警告" + +#: static/js/confirmation.js:59 +msgid "Cancel" +msgstr "取消" + +#: static/js/global.js:347 +msgid "Internal error" +msgstr "内部错误" + +#: static/js/listing.js:21 +msgid "No more entry to show" +msgstr "没有更多的条目可以显示" + +#: static/js/listing.js:46 +msgid "Search" +msgstr "查找" + +#: static/js/searchbar.js:28 +msgid "Search..." +msgstr "查找..." + +#: static/js/twocols_nav.js:170 +msgid "Are you sure?" +msgstr "你确定吗?" + +#: static/js/twocols_nav.js:171 +msgid "This will invalidate your registered application." +msgstr "这会使您的注册申请无效。" diff --git a/mysql-requirements.txt b/mysql-requirements.txt index 4b7bd761c..dee426737 100644 --- a/mysql-requirements.txt +++ b/mysql-requirements.txt @@ -1 +1 @@ -mysqlclient<2.0.2 +mysqlclient<2.0.4 diff --git a/requirements.txt b/requirements.txt index 3e9a0cccf..2d686696e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,7 +2,7 @@ django>=2.2,<2.3 django-braces==1.14.0 django-ckeditor==6.0.0 django-phonenumber-field[phonenumbers]==5.0.0 -django-reversion==3.0.8 +django-reversion==3.0.9 django-xforwardedfor-middleware==2.0 django-otp==1.0.2 diff --git a/test-requirements.txt b/test-requirements.txt index 6006e2bb4..d30e8202f 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,6 +1,6 @@ argon2-cffi>=16.1.0 factory-boy<=2.12.0 httmock==1.4.0 -testfixtures==6.15.0 +testfixtures==6.17.1 tox asynctest