From 865ac83f867a0fc7f7eaa01fcca706afbbe9f201 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 10 Dec 2020 05:01:10 +0000 Subject: [PATCH 01/13] Bump testfixtures from 6.15.0 to 6.16.0 Bumps [testfixtures](https://github.com/Simplistix/testfixtures) from 6.15.0 to 6.16.0. - [Release notes](https://github.com/Simplistix/testfixtures/releases) - [Changelog](https://github.com/Simplistix/testfixtures/blob/master/CHANGELOG.rst) - [Commits](https://github.com/Simplistix/testfixtures/compare/6.15.0...6.16.0) Signed-off-by: dependabot[bot] --- test-requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test-requirements.txt b/test-requirements.txt index 6006e2bb4..541d71470 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.16.0 tox asynctest From 3a9f825e8fc03ac720ef82def51c5833c169c301 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 11 Dec 2020 08:52:27 +0000 Subject: [PATCH 02/13] Update mysqlclient requirement from <2.0.2 to <2.0.3 Updates the requirements on [mysqlclient](https://github.com/PyMySQL/mysqlclient) to permit the latest version. - [Release notes](https://github.com/PyMySQL/mysqlclient/releases) - [Changelog](https://github.com/PyMySQL/mysqlclient/blob/master/HISTORY.rst) - [Commits](https://github.com/PyMySQL/mysqlclient/commits) Signed-off-by: dependabot[bot] --- mysql-requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql-requirements.txt b/mysql-requirements.txt index 4b7bd761c..6eed28562 100644 --- a/mysql-requirements.txt +++ b/mysql-requirements.txt @@ -1 +1 @@ -mysqlclient<2.0.2 +mysqlclient<2.0.3 From 36a04fec0929938d723ec34430c862cc91f5c54a Mon Sep 17 00:00:00 2001 From: Vince Pike Date: Sat, 12 Dec 2020 02:46:46 -0500 Subject: [PATCH 03/13] Update the connection string for beginners (#2095) Co-authored-by: Christophe CHAUVET --- doc/manual_installation/modoboa.rst | 3 +++ 1 file changed, 3 insertions(+) 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. From 7d96a6b1f1f3621e88966f346f22b7bb9cf2f548 Mon Sep 17 00:00:00 2001 From: "transifex-integration[bot]" <43880903+transifex-integration[bot]@users.noreply.github.com> Date: Sat, 12 Dec 2020 08:31:12 +0000 Subject: [PATCH 04/13] Apply translations in de (#2085) translation completed for the source file '/modoboa/locale/en/LC_MESSAGES/djangojs.po' on the 'de' language. Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com> Co-authored-by: Christophe CHAUVET --- modoboa/locale/de/LC_MESSAGES/djangojs.po | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) 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." From b531370766beeb1a8c051566985e334e04a32555 Mon Sep 17 00:00:00 2001 From: Christophe CHAUVET Date: Mon, 28 Dec 2020 08:45:13 +0100 Subject: [PATCH 05/13] Update Issue Template and links --- .../Bug_Report.md} | 17 ++++++++++++++++- .github/ISSUE_TEMPLATE/config.yml | 8 ++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) rename .github/{ISSUE_TEMPLATE.md => ISSUE_TEMPLATE/Bug_Report.md} (52%) create mode 100644 .github/ISSUE_TEMPLATE/config.yml 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..91c7d5a57 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 framework.' +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 From 74e661be8dce0f6bfcb1501ccf3dcb4c295c893e Mon Sep 17 00:00:00 2001 From: Christophe CHAUVET Date: Mon, 28 Dec 2020 14:13:54 +0100 Subject: [PATCH 06/13] Replace Framework by Software --- .github/ISSUE_TEMPLATE/Bug_Report.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/Bug_Report.md b/.github/ISSUE_TEMPLATE/Bug_Report.md index 91c7d5a57..166f7db16 100644 --- a/.github/ISSUE_TEMPLATE/Bug_Report.md +++ b/.github/ISSUE_TEMPLATE/Bug_Report.md @@ -1,6 +1,6 @@ --- name: 'Bug Report' -about: 'Report a reproducible bug in the framework.' +about: 'Report a reproducible bug in the software.' title: '' labels: '' assignees: '' From b23ba59912350c0bb91cb8302aec610cfc0806e8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Jan 2021 05:03:24 +0000 Subject: [PATCH 07/13] Update mysqlclient requirement from <2.0.3 to <2.0.4 Updates the requirements on [mysqlclient](https://github.com/PyMySQL/mysqlclient) to permit the latest version. - [Release notes](https://github.com/PyMySQL/mysqlclient/releases) - [Changelog](https://github.com/PyMySQL/mysqlclient/blob/master/HISTORY.rst) - [Commits](https://github.com/PyMySQL/mysqlclient/commits) Signed-off-by: dependabot[bot] --- mysql-requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql-requirements.txt b/mysql-requirements.txt index 6eed28562..dee426737 100644 --- a/mysql-requirements.txt +++ b/mysql-requirements.txt @@ -1 +1 @@ -mysqlclient<2.0.3 +mysqlclient<2.0.4 From 9df210b86938fee19e7fe744825a658d7ee794f0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Jan 2021 08:49:57 +0000 Subject: [PATCH 08/13] Bump testfixtures from 6.16.0 to 6.17.1 Bumps [testfixtures](https://github.com/Simplistix/testfixtures) from 6.16.0 to 6.17.1. - [Release notes](https://github.com/Simplistix/testfixtures/releases) - [Changelog](https://github.com/Simplistix/testfixtures/blob/master/CHANGELOG.rst) - [Commits](https://github.com/Simplistix/testfixtures/compare/6.16.0...6.17.1) Signed-off-by: dependabot[bot] --- test-requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test-requirements.txt b/test-requirements.txt index 541d71470..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.16.0 +testfixtures==6.17.1 tox asynctest From 633fd076261d67612377659584df5cb9758dbbfa Mon Sep 17 00:00:00 2001 From: "transifex-integration[bot]" <43880903+transifex-integration[bot]@users.noreply.github.com> Date: Wed, 20 Jan 2021 07:30:01 +0000 Subject: [PATCH 09/13] Apply translations in zh_CN (#2121) translation completed for the source file '/modoboa/locale/en/LC_MESSAGES/djangojs.po' on the 'zh_CN' language. Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com> Co-authored-by: Christophe CHAUVET --- modoboa/locale/zh_CN/LC_MESSAGES/djangojs.po | 66 ++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 modoboa/locale/zh_CN/LC_MESSAGES/djangojs.po 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 "这会使您的注册申请无效。" From 3101f30b67783b51311c319f98b61366c03466b7 Mon Sep 17 00:00:00 2001 From: "transifex-integration[bot]" <43880903+transifex-integration[bot]@users.noreply.github.com> Date: Wed, 20 Jan 2021 07:39:21 +0000 Subject: [PATCH 10/13] Apply translations in zh_CN (#2122) translation completed for the source file '/modoboa/ldapsync/locale/en/LC_MESSAGES/django.po' on the 'zh_CN' language. Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com> --- .../locale/zh_CN/LC_MESSAGES/django.po | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 modoboa/ldapsync/locale/zh_CN/LC_MESSAGES/django.po 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帐户: {}" From 59af8feb18aa1f19b445c623637490fa66eb43f2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Jan 2021 08:58:26 +0000 Subject: [PATCH 11/13] Bump django-reversion from 3.0.8 to 3.0.9 Bumps [django-reversion](https://github.com/etianen/django-reversion) from 3.0.8 to 3.0.9. - [Release notes](https://github.com/etianen/django-reversion/releases) - [Changelog](https://github.com/etianen/django-reversion/blob/master/CHANGELOG.rst) - [Commits](https://github.com/etianen/django-reversion/compare/v3.0.8...v3.0.9) Signed-off-by: dependabot[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From 0010035c89d36a1da07c211269d5992e43cd3d0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Lebleu?= Date: Tue, 26 Jan 2021 11:13:55 +0100 Subject: [PATCH 12/13] Disable internal alias too with the account (fix #2120) --- modoboa/admin/forms/account.py | 5 ++--- modoboa/admin/tests/test_account.py | 8 +++++++- 2 files changed, 9 insertions(+), 4 deletions(-) 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) From 63a8e8435351cd5aeee47c322146b085c7f5978b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Lebleu?= Date: Tue, 26 Jan 2021 12:25:03 +0100 Subject: [PATCH 13/13] Resynchronize the package index in tests --- .github/workflows/modoboa.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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