Commit Graph

29 Commits

Author SHA1 Message Date
Adrià Casajús
31896ff262
Replace black and flake8 with ruff (#1943) 2023-11-21 16:42:18 +01:00
Adrià Casajús
6e4f6fe540
Sanitize alias, contacts, mailboxes and users before creating them (#1829)
* Sanitize alias, contacts, mailboxes and users before creating them

* Updated comments and moved crons to run when load is low

* Run the stats at the same time as previously

---------

Co-authored-by: Adrià Casajús <adria.casajus@proton.ch>
2023-08-03 10:20:25 +02:00
Adrià Casajús
6dfb6bb3e4
Revert "Add code verification for creating mailboxes (#1725)" (#1727)
This reverts commit a5e7da10dd.

Co-authored-by: Adrià Casajús <adria.casajus@proton.ch>
2023-05-09 18:04:04 +02:00
Adrià Casajús
a5e7da10dd
Add code verification for creating mailboxes (#1725)
* Add code verification for creating mailboxes

* Added validation checks

* Use exceptions

* Added delete to the mailbox utils

* Fix test

* Update package.lock

* Fix delete error

---------

Co-authored-by: Adrià Casajús <adria.casajus@proton.ch>
2023-05-09 16:35:58 +02:00
Son Nguyen Kim
170082e2c1
after deleting an alias, user should stay on the same page (#1546)
* after deleting an alias, user should stay on the same page

* Fix delete alias mlec (#1547)

* Specify how to create the certificates if they don't exist in readme (#1533)

* Remove id= from get 🩹

* Add flash message level 🩹

* Rename transfer_mailbox back to new_mailbox in the create-mailbox part 🩹

Co-authored-by: rubencm <rubencm@gmail.com>

* Fix delete alias mlec (#1552)

* Specify how to create the certificates if they don't exist in readme (#1533)

* Remove id= from get 🩹

* Add flash message level 🩹

* Rename transfer_mailbox back to new_mailbox in the create-mailbox part 🩹

* Linting files to pass test 🎨

Co-authored-by: rubencm <rubencm@gmail.com>

Co-authored-by: mlec <42201667+mlec1@users.noreply.github.com>
Co-authored-by: rubencm <rubencm@gmail.com>
2023-01-25 13:16:10 +01:00
Adrià Casajús
81eb56e213
Tranfer aliases to a new mailbox when deleting mailboxes (#1534)
* Set up npm clean install instead of npm install in order to keep the version of npm packages 🎨

* Add option to transfer the alias to a new mailbox when a mailbox is deleted

* Moved alias transfer to job

* Lint

* Update forms

* Revert dockerfile change

Co-authored-by: ewen <ewen.coppens@a1.digital>
Co-authored-by: Adrià Casajús <adria.casajus@proton.ch>
2023-01-17 11:55:34 +01:00
Adrià Casajús
67be5ba050
Enforce int params in routes (#1159)
Co-authored-by: Adrià Casajús <adria.casajus@proton.ch>
2022-07-15 17:10:00 +02:00
Son
fbabe6fb44 use job system for deleting mailbox 2021-10-13 11:40:15 +02:00
Son
372466ab06 do not use flask-sqlalchemy
- add __tablename__ for all models
- use sa and orm instead of db
- rollback all changes in tests
- remove session in @app.teardown_appcontext
2021-10-12 14:36:47 +02:00
Son NK
eb2adc870a make sure only premium user can create new mailbox via API 2021-06-02 17:17:28 +02:00
Son NK
d5de99afe9 Restore /alias/custom/new as currently used by safari 2021-03-31 14:41:32 +02:00
Son NK
e9adb3270d use sanitize_email instead of .lower().strip().replace(" ", "") 2021-01-11 12:29:40 +01:00
Son NK
a1d5b01143 make sure mailbox email is valid 2020-11-22 12:18:31 +01:00
Son NK
4b6368b378 make sure only verified mailbox can be used as default 2020-11-03 12:43:01 +01:00
Son NK
19ac657c1c add GET /api/v2/mailboxes 2020-11-03 12:14:13 +01:00
Son NK
273537e7ae use same mailbox format for "POST /api/mailboxes" and "GET /api/mailboxes" 2020-11-03 11:22:01 +01:00
Son NK
90163220cf rename email_domain_can_be_used_as_mailbox -> email_can_be_used_as_mailbox 2020-10-15 16:05:47 +02:00
Son NK
d81ad2fd12 sanitize mailbox before creating: remove empty space 2020-09-17 17:02:50 +02:00
Son NK
774ffcae3b enable CORS on /api endpoints 2020-06-24 10:30:01 +02:00
Son NK
48998ff07e return nb_alias in GET /mailboxes 2020-05-31 11:52:01 +02:00
Son NK
0530a8aab5 return creation_timestamp in GET /mailboxes 2020-05-31 11:49:53 +02:00
Son NK
78d9a88328 Add default field to GET /api/mailboxes 2020-05-27 14:18:20 +02:00
Son NK
6fc380c0d9 remove unused imports 2020-05-23 19:18:35 +02:00
Son NK
6280512adf move get mailboxes to mailbox.py 2020-05-23 16:46:10 +02:00
Son NK
3eb6700232 user can cancel mailbox email change 2020-05-23 16:43:48 +02:00
Son NK
2f087de061 can update mailbox email 2020-05-23 16:40:28 +02:00
Son NK
a76ad0485f PUT /api/mailboxes/:mailbox_id: update mailbox 2020-05-23 16:26:26 +02:00
Son NK
5ae39c85c6 Add DELETE /api/mailboxes/:mailbox_id 2020-05-23 16:18:12 +02:00
Son NK
722bff319e add POST /api/mailboxes: create a new mailbox 2020-05-23 16:17:42 +02:00