Commit Graph
41 Commits
Author SHA1 Message Date
Spitap b79dffada8 fixed test 2023-02-08 14:08:16 +01:00
Spitap 8c0fb3d4ff Better throttle, attempt to have proper UX 2023-02-07 12:47:58 +01:00
Spitap cbfac68b97 Make throttling more strict 2023-01-27 22:03:09 +01:00
Spitap bde07163b0 Fixed default throttle class 2023-01-27 17:41:32 +01:00
Spitap 0d2f3d05a3 Added throttling to v2 api routes 2023-01-27 16:27:52 +01:00
Antoine Nguyen 43020542f8 Better API documentation. 2022-09-17 10:40:06 +02:00
Spitap e06de0a0cc Auto fetch application parameter label 2022-09-06 19:46:15 +02:00
Antoine Nguyen ea41ccd44e Valid MXs field must contain only IPs.
see #1664
2022-05-05 15:19:28 +02:00
Antoine Nguyen 4ef53a8cd7 Django 3.2 support 2022-04-20 11:39:43 +02:00
Jérôme Lebleu 0793905e78 Fixed warnings reported by drf-speculator
- Unable to guess serializer of AccountViewSet, IdentityViewSet and
  ParametersViewSet
- There was no OpenApiAuthenticationExtension registered for the
  subclass JWTAuthenticationWith2FA
2021-07-07 14:03:36 +02:00
Antoine Nguyen ec737efc26 Cleanup and unit tests. 2021-06-03 09:02:55 +02:00
Antoine Nguyen 812608978f Added unit tests about parameters API. 2021-06-02 11:23:00 +02:00
Antoine Nguyen ea98bed16b Changes:
* Updated parameter forms
* Updated layout
* Updated login page
* Added 2FA authentication
2021-05-29 09:57:35 +02:00
Antoine Nguyen 68fa66b772 Make a clear distinction between v1 and v2 API endpoints. 2021-02-17 08:59:43 +01:00
Antoine Nguyen dde2027569 Improved API doc. 2020-12-04 09:26:40 +01:00
Antoine Nguyen 110c527671 Updated vuejs and vuetify. 2020-10-16 09:03:47 +02:00
Antoine Nguyen 8898eda7c4 Merge branch 'master' into refacto/vuejs_interface 2020-10-07 10:14:27 +02:00
Antoine Nguyen 49017ac374 Fixed pep8 issues. 2020-05-05 21:50:12 +02:00
Clément RivièreandGitHub 8fa842d92c LDAP Authentication - Webmail / Dovecot (#1876)
* Adding settings options for dovecot ldap sync

* Creating update_dovecot_conf command

* Adding async command to update dovecot ldap conf

* Adding unit tests

* Adding port to dovecot generated uris & unit tests

* Code improvement & doc update & tests update
2020-05-05 21:36:29 +02:00
Antoine Nguyen cb0197c609 Retrieve password by SMS.
see #1877
2020-04-21 11:34:29 +02:00
Jérôme Lebleu 369d05e1c3 Remove the UTF-8 coding header 2020-01-07 10:16:54 +01:00
Jérôme Lebleu 74d66c00a0 Update imports for Python 3.4+ 2020-01-07 10:16:54 +01:00
Antoine Nguyen 6d17cb4f30 All parameters are migrated. 2018-10-05 14:06:59 +02:00
Antoine Nguyen 19f2af429a Better parameters management. 2018-10-05 14:06:59 +02:00
Antoine Nguyen b41a096458 Replaced buefy by vuetify. 2018-10-05 14:06:59 +02:00
Antoine Nguyen af1461469a WIP: new system to manage settings. 2018-10-05 14:06:59 +02:00
Andrew Fyfe f71414ddfa add missing utf8 header
use `# -*- coding: utf-8 -*-` which is more widely supported by editors
2018-02-03 00:59:08 +00:00
Andrew Fyfe 3159eca296 import unicode_literals
and remove it from empty __init__.py files
2018-02-03 00:59:07 +00:00
Andrew Fyfe 87e8a32063 whitespace fixes 2018-02-03 00:59:06 +00:00
Andrew Fyfe eaec271e02 pep8 fixes
- B007 Loop control variable not used within the loop body. If this is intended, start the name with an underscore.
    * modoboa/admin/lib.py
    * modoboa/admin/templatetags/admin_tags.py
    * modoboa/admin/tests/test_account.py
    * modoboa/admin/views/domain.py
    * modoboa/admin/views/identity.py
    * modoboa/core/views/dashboard.py
    * modoboa/limits/forms.py
    * modoboa/limits/handlers.py
    * modoboa/limits/tests/test_api.py
    * modoboa/limits/tests/test_domain_limits.py
    * modoboa/limits/tests/test_import.py
    * modoboa/limits/tests/test_user_limits.py
    * modoboa/limits/utils.py
    * modoboa/parameters/tools.py
    * modoboa/relaydomains/tests.py
- C402 Unnecessary generator - rewrite as a dict comprehension.
    * modoboa/admin/models/domain.py
    * modoboa/admin/views/domain.py
    * modoboa/admin/views/identity.py
    * modoboa/limits/searializers.py
- C407 Unnecessary list comprehension - can take a generator.
    * modoboa/core/password_validation.py
    * modoboa/parameters/tools.py
    * modoboa/transport/backends.py
- C408 Unnecessary dict call - rewrite as a literal.
    * modoboa/admin/tests/test_account.py
    * modoboa/admin/tests/test_alias.py
    * modoboa/admin/tests/test_password_schemes.py
    * modoboa/admin/views/domain.py
    * modoboa/admin/views/identity.py
    * modoboa/core/extensions.py
    * modoboa/lib/middleware.py
    * modoboa/lib/templatetags/form_tags.py
    * modoboa/lib/templatetags/lib_tags.py
    * modoboa/lib/web_utils.py
    * modoboa/limits/handlers.py
    * modoboa/limits/tests/test_user_limits.py
- E741 ambiguous variable name
    * modoboa/core/management/commands/cleanlogs.py
    * modoboa/limits/forms.py
    * modoboa/limits/tests/test_user_limits.py
    * modoboa/limits/utils.py
    * modoboa/relaydomains/tests.py
- F401 imported but unused
    * doc/conf.py
    * modoboa/admin/views/domain.py
    * modoboa/core/app_settings.py
    * modoboa/core/management/commands/load_initial_data.py
- F821 undefined name 'raw_input'
    * modoboa/core/commands/deploy.py
- F841 local variable 'test' is assigned to but never used
    * modoboa/core/app_settings.py
- N802 function name 'setUpTestData' should be lowercase xxx
    * modoboa/lib/email_utils.py - __ for name mangeling, _ for internal
- N805 first argument of a method should be named 'self'
    * modoboa/lib/connections.py
    * modoboa/lib/singleton.py

Ignore the following
- A001 "copyright" is a python builtin and is being shadowed, consider renaming the variable
    * doc/conf.py
- A003 is a python builtin, consider renaming the class attribute
    * modoboa/admin/factories.py
    * modoboa/admin/forms/domain.py
    * modoboa/admin/management/commands/handle_mailbox_operations.py
    * modoboa/admin/management/commands/modo.py
    * modoboa/admin/management/commands/subcommands/_repair.py
    * modoboa/admin/models/domain.py
    * modoboa/admin/models/mailbox.py
    * modoboa/core/commands/__init__.py
    * modoboa/core/commands/deploy.py
    * modoboa/core/commands/help.py
    * modoboa/core/management/commands/clean_inactive_accounts.py
    * modoboa/core/management/commands/cleanlogs.py
    * modoboa/core/management/commands/communicate_with_public_api.py
    * modoboa/core/management/commands/generate_postfix_maps.py
    * modoboa/core/management/commands/load_initial_data.py
    * modoboa/core/management/commands/set_default_site.py
- F401 imported but unused
    * modoboa/admin/apps.py - used to load handlers
    * modoboa/core/password_hashers/__init__.py - dynamically loaded
    * modoboa/limits/apps.py - used to load handlers
    * modoboa/relaydomains/apps.py - used to load handlers
    * modoboa/transport/apps.py - used to load handlers
- N802 function name should be lowercase xxx
    * modoboa/admin/tests/test_account.py
    * modoboa/admin/tests/test_alias.py
    * modoboa/admin/tests/test_domain_alias.py
    * modoboa/admin/tests/test_export.py
    * modoboa/admin/tests/test_mailbox_operations.py
    * modoboa/admin/tests/test_password_schemas.py
    * modoboa/admin/tests/test_repair.py
    * modoboa/core/tests/test_authentication.py
    * modoboa/core/tests/test_core.py
    * modoboa/core/tests/test_ldap.py
    * modoboa/core/tests/test_views.py
    * modoboa/lib/imap_utf7.py
    * modoboa/limits/tests/test_api.py
    * modoboa/limits/tests/test_domain_limits.py
    * modoboa/limits/tests/test_import.py
    * modoboa/limits/tests/test_user_limits.py
    * modoboa/relaydomains/tests.py

other fixes:
- use isinstance() instead of type() == Class
2018-02-03 00:44:00 +00:00
Andrew Fyfe 24a7ca6a9e sort imports using isort
pip install isort
isort -y
2018-02-03 00:43:59 +00:00
Andrew Fyfe 8a1d5736c9 fix quotes
This ensures all files use " for quotes with the exception of
migrations, as this are auto generated I've not modified them.

pip install unify
unify --in-place --recursive --quote \" .
2018-02-03 00:43:58 +00:00
Arthur Vuillard 615f73f272 unicode_literals everywhere and modoboa-admin deploy fixes 2017-05-11 09:25:42 +02:00
Arthur Vuillard 9a5c293d52 remove useless builtins imports 2017-05-11 00:02:00 +02:00
Antoine Nguyen 2109feffd2 Initial python3 support. 2017-05-10 18:29:17 +02:00
Antoine Nguyen 9ee200ea5b WIP. 2016-11-19 16:45:09 +01:00
Antoine Nguyen 762f621493 WIP. 2016-11-05 14:19:59 +01:00
Antoine Nguyen bf373dcd1c Few fixes. 2016-11-04 22:15:30 +01:00
Antoine Nguyen 7aa85b1536 Fix unit test.
see #951
2016-10-28 15:48:09 +02:00
Antoine Nguyen d1b59cc312 WIP
see #951
2016-10-28 15:48:08 +02:00
Antoine Nguyen 3fb1c13f18 WIP
see #951
2016-10-28 15:48:08 +02:00