* Update render function to receive user always as a param
(cherry picked from commit fb53632298b08ab40bb82b8c8724a0bf254b2632)
* Add user to the kwargs
* feat: add protocol buffers for events
* chore: add EventDispatcher
* chore: add WebhookEvent class
* chore: emit events
* feat: initial version of event listener
* chore: emit user plan change with new timestamp
* feat: emit metrics + add alias status to create event
* chore: add newrelic decorator to functions
* fix: event emitter fixes
* fix: take null end_time into account
* fix: avoid double-commits
* chore: move UserDeleted event to User.delete method
* db: add index to sync_event created_at and taken_time columns
* chore: add index to model
* Move accounts settings under sudo
* Fixed sudo mode
* Add a log message
* Update test
* Renamed sudo_setting to account_setting
* Moved simple login data export and alias/import export to account settings
* Move account settings to the top-right dropdown
* Store the latest email_log id in the alias to simplify dashboard query
* Fix test
* Add script to migrate users last email_log_id to alias
* Always update the alias last_email_log_id automatically
* Only set the alias_id if it is set
* Fix test with randomization
* Fix notification test
* Also remove explicit set on tests
* Rate limit alias creation to prevent abuse (#2021)
* Rate limit alias creation to prevent abuse
* Limit in secs
* Calculate bucket time
* fix exception
* Tune limits
* Move rate limit config to configuration (#2023)
* Fix dropdown item in header (#2024)
* Add option for admin to stop trial (#2026)
* Fix: if redis is not configured do not enable rate limit (#2027)
* support product IDs for the new Mac app (#2028)
Co-authored-by: Son NK <son@simplelogin.io>
* Add metrics to rate limit (#2029)
* Order domains alphabetically when retrieving them (#2030)
* Removed unused import
* Remove debug info
---------
Co-authored-by: D-Bao <49440133+D-Bao@users.noreply.github.com>
Co-authored-by: Son Nguyen Kim <son.nguyen@proton.ch>
Co-authored-by: Son NK <son@simplelogin.io>
* 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>
* update some dependencies: newrelic, gevent
that isn't compatible with python 3.11 on mac
* update package-lock using npm 9.6.4 and node 20.0
* Add GET /api/stats
* update pytest
---------
Co-authored-by: Son Nguyen Kim <son@Sons-MacBook-Air-2.local>
* 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>
* 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>
* Feat: Allow TOTP for up to one minute in the future and in the past
* Feat: Allow TOTP for up to one minute in the future and in the past
Co-authored-by: Adrià Casajús <adria.casajus@proton.ch>
* Use canonical email for registration, check both when checking if user exists
* Fix test
* Set pagesize to 100
Co-authored-by: Adrià Casajús <adria.casajus@proton.ch>
* Export alias in csv
* reformating
* template
* Improved contributing script and doc
* Updated test
* removed csv export from GDPR export archive
* added test for new route
* fix trailing space
* moved test to new utils file
* Feat: Added parallel limiter to prevent sqlalchemy transaction issues
* Remove logs
* Moved initialization to its own file
* Throw exception
* Added test
* Add redis to gh actions
* Added v6 to the name
* Removed debug prints
Co-authored-by: Adrià Casajús <adria.casajus@proton.ch>
* Store sesions in redis to prevent saving old cookies
* Format
* Rename sid to session_id
* Logout session completely
Co-authored-by: Adrià Casajús <adria.casajus@proton.ch>
* 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>
* 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>
* Allow to set sudo mode for api requests
* Rebase migration on top of master
* PR comments
* Added missing migration
* Removed unused import
* Apply suggestions from code review
Co-authored-by: Adrià Casajús <adria.casajus@proton.ch>