* add User.enable_data_breach_check column
* user can turn on/off the data breach check
* only run data breach check for user who enables it
* add tips to run tests using a local DB (without docker)
* refactor True check
* trim trailing space
* fix test
* Apply suggestions from code review
Co-authored-by: Adrià Casajús <acasajus@users.noreply.github.com>
* format
---------
Co-authored-by: Son NK <son@simplelogin.io>
Co-authored-by: Adrià Casajús <acasajus@users.noreply.github.com>
* Delete old email_log entries in batches to avoid table lock
* Avoid nested join
* Commiting after the batch delete
* Added statement count print
* Rename var
* Accounts to be scheduled to be deleted cannot receive emails or login
* Create model and create migration for user
* Add test for the cron function
* Move logic to one place
* Use the class name to call the static delete method
* 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>
* Yield on big queries and check the trial is active in the query directly
* Eagerly load the hibp aliases to check
* Updated trial condition
* Also yield referral
---------
Co-authored-by: Adrià Casajús <adria.casajus@proton.ch>
* Rate limit the sudo route
* Add missing indexes
* Updated index
* Update index creation to run with concurrent
* With autocommit block
---------
Co-authored-by: Adrià Casajús <adria.casajus@proton.ch>
* remove unused email statuses
* add more logging
* use text_header if html_header not set
* improve email
* add a header about PGP failure when forward emails can't be encrypted
* remove unused email status
* Create a token to exchange for a cookie
* Added Route to exchange token for cookie
* add missing migration
Co-authored-by: Adrià Casajús <adria.casajus@proton.ch>
* Send email to users with a subscription and a partner plan upgrade
* Update double-subscription-partner.html
* Update double-subscription-partner.txt.jinja2
Co-authored-by: Adrià Casajús <adria.casajus@proton.ch>
Co-authored-by: Son Nguyen Kim <nguyenkims@users.noreply.github.com>