Commit graph

23 commits

Author SHA1 Message Date
Son Nguyen Kim
7b24cdd98a
Revert "remove deduct_limit as it has no effect (#1347)" (#1348)
This reverts commit 851ba0a99a.
2022-10-13 22:00:45 +02:00
Son Nguyen Kim
851ba0a99a
remove deduct_limit as it has no effect (#1347)
* remove deduct_limit as it has no effect

- disable rate limit during test
- randomize data in test
- support non-empty db in test

* fix more test
2022-10-13 18:55:22 +02:00
Adrià Casajús
25fde11a86
Refactor alias suffix (#1194)
* Extract suffix generation and validation to a module

* Updated tests

* Make custom alias use signed suffixes

* Added the signature check to the module

* Fix invalid route

* Move more suffix related stuff

* Fix tests

Co-authored-by: Adrià Casajús <adria.casajus@proton.ch>
2022-07-27 17:40:22 +02:00
Son
becde6458b fix test 2022-04-18 11:55:14 +02:00
Son
9a994ec98b fix test 2022-04-18 11:17:10 +02:00
Son
80b0af91e5 allow user to create alias with domain that has ownership verified (and might not have MX verified) 2021-12-29 10:24:22 +01:00
Son
416eafaeb9 use the first alias suffix when creating a new random alias 2021-11-12 11:04:00 +01:00
Son
bb5259ac3f fix test 2021-11-12 10:00:01 +01:00
Son
611fb8a20c take into account user.include_website_in_one_click_alias in /api/alias/random/new 2021-11-12 09:45:31 +01: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
e46e3b1c01 fix test 2021-03-24 16:51:23 +01:00
Son NK
0c62ac4b1f set rate limit for creating alias endpoint 2021-03-24 16:26:42 +01:00
Son NK
10cc61b4a0 refactor test 2021-03-24 15:54:03 +01:00
Son NK
97dff83453 return full alias info in POST /api/alias/random/new 2020-03-26 19:50:22 +01:00
Son NK
4f281bdbbb rename GenEmail -> Alias, gen_email to alias whenever possible 2020-03-17 11:51:40 +01:00
Son NK
e713efee98 reformat 2020-03-13 10:34:41 +01:00
Son NK
1098f17c0c Support note in POST /api/alias/random/new 2020-03-11 12:24:30 +01:00
Son NK
3b454b9a80 fix test 2020-03-05 20:32:08 +01:00
Son NK
e10981f85e able to create word-based or uuid-based in /api/alias/random/new endpoint 2020-02-07 21:30:46 +07:00
Son NK
ad1cf3af8c fix test 2020-01-30 13:20:32 +07:00
Son NK
377e6c657d add /api/alias/random/new 2020-01-05 21:15:16 +01:00
Son NK
565d406227 remove new_random_alias related test 2019-12-15 18:55:18 +02:00
Son NK
ef888288a6 add tests for api create custom/random alias 2019-12-15 18:55:17 +02:00