291 Commits

Author SHA1 Message Date
Son Nguyen 67de89e781 remove coinbase hook 2026-03-24 15:36:43 +01:00
Adrià Casajús d937cc34e2 Upate adminpanel to be able to search via regex 2026-01-16 09:27:45 +01:00
Adrià Casajús 0ade025bd0 Disable rate limits in tests 2025-11-21 11:31:52 +01:00
Adrià Casajús 6e4d3ca2a6 Add domain email search 2025-10-31 11:35:09 +01:00
Adrià Casajús 16c54b84ac Add mailbox search 2025-09-22 10:11:51 +02:00
Adrià Casajús 6f391511b0 Add migration 2025-07-28 15:33:20 +02:00
Adrià Casajús 2afb58d079 Set sentry trace configuration 2025-06-18 12:46:34 +02:00
Bohdan Shtepan 720b4a0608 feat: adds abuser lookup admin view. (#2472)
* feat: adds abuser lookup admin view.

* fix: restore test.env

* feat: update the ui for the abuser lookup view.

* feat: update the one-shot job to do the thing in batches.
2025-05-20 14:13:28 +00:00
Carlos Quintana ba9ed4f956 chore: upgrade to python 3.12 (#2396)
* chore: upgrade to python 3.12

* ci: do not use setup-python

* deps: add limits dependency

* deps: remove fixed dependency to six

* chore: disable profiler in flask debug toolbar as it does not work with python3.12

* deps: specify strictyaml dependency for yacron
2025-02-26 09:33:34 +01:00
Adrià Casajús accab2dd52 Add button to unlink from the admin panel (#2387)
* Add button to unlink from the admin panel

* format

* typo

* typo
2025-02-10 10:09:45 +00:00
Carlos Quintana ffb070cd19 chore: offer version in newrelic events (#2380)
* chore: offer version in newrelic events

* chore: send version event on startup and on other services
2025-02-05 10:09:52 +00:00
Carlos Quintana 6f7070cae2 feat: add request_id in log (#2367)
* feat: add request_id in log

* fix: top-level import
2025-01-29 07:21:34 +00:00
Adrià Casajús aeee88f2c8 Prevent accounts created from partner directly to unlink 2025-01-24 14:45:27 +01:00
Adrià Casajús 0ccbbd711f Add custom domain admin page (#2348)
* Add custom domain admin page

* Add domain search
2024-12-20 10:02:35 +01:00
Carlos Quintana 67b3820f61 feat: audit log and admin panel improvements (#2274)
* feat: add deleted alias audit logs

* feat: emit event when user is created or password reset

* feat: improve admin panel
2024-10-18 13:32:26 +00:00
Carlos Quintana 35f6e67053 feat: user audit log (#2266)
* feat: set up UserAuditLog

* refactor: extract payment callbacks into their own files + handle subscription user_audit_log

* feat: handle account linking for user audit log

* chore: user_audit_log for mailboxes

* chore: user_audit_log for custom domains

* chore: user_audit_log for contacts

* chore: user_audit_log for directories

* fix: do not enforce cronjob being defined in choices + enable user deletion

* chore: user_audit_log for user deletion

* refactor: change emit_user_audit_log function to receive the full user object

* feat: add user_audit_log migration

* test: fix tests

* test: add some tests for user_audit_log

* fix: spf record verification user_audit_log

* chore: add missing index to user_audit_log.created_at

* chore: add missing index to alias_audit_log.created_at
2024-10-16 16:57:59 +02:00
Carlos Quintana 1554bea064 feat: record newrelic event for http status code (#2259) 2024-10-11 07:51:52 +00:00
Carlos Quintana 076d5108d8 feat: update sentry and ignore 416 errors (#2258)
* dep: update sentry_sdk

* feat(sentry): ignore 416 status codes
2024-10-10 15:42:54 +02:00
Adrià Casajús 8dfa886024 Admin panel improvements (#2179) 2024-08-02 16:15:18 +00:00
Carlos Quintana b823f4359a fix: do not log health requests (#2177) 2024-08-02 07:18:16 +00:00
Carlos Quintana 429ebf57cf chore: add health endpoint (#2175) 2024-08-01 07:12:12 +00:00
Adrià Casajús 25022b4ad8 Several fixes (#2157)
* Ensure uploaded pictures are images and delete the previous ones

* Add CSRF protection to admin routes

* Only allow https urls in the client envs

* Close connection to try to get a new one

* Missing parameter

* start_time can be non existant. Set a default value
2024-07-18 12:48:18 +00:00
Adrià Casajús 5d48b5878f Restrict cookie usage on api endpoints (#2151) 2024-07-10 10:48:46 +00:00
Carlos Quintana 87e55605b8 fix: coinbase float user id (#2149) 2024-07-10 07:58:17 +00:00
Adrià Casajús 2d841e9bc0 Update render function to receive user always as a param (#2141)
* Update render function to receive user always as a param

(cherry picked from commit fb53632298b08ab40bb82b8c8724a0bf254b2632)

* Add user to the kwargs
2024-07-03 12:59:16 +00:00
Adrià Casajús 173ae6a221 Allow to soft-delete users (#2034)
* Allow the possibility of soft-deleting users

* Unschedule for delete after link

* Add dry run to the cron
2024-02-22 17:38:34 +01:00
Adrià Casajús 72041ee520 Show BF banner until end of promotion (#1953) 2023-11-30 11:48:55 +01:00
Adrià Casajús 31896ff262 Replace black and flake8 with ruff (#1943) 2023-11-21 16:42:18 +01:00
Adrià Casajús 8c7e9f7fb3 Fix: only send subscription notification if there is a valid subscription (#1762)
Co-authored-by: Adrià Casajús <adria.casajus@proton.ch>
2023-05-31 18:20:18 +02:00
Adrià Casajús e43a2dd34d Have subscription callback whenever a subscription changes (#1748)
* Have subscription callback whenever a subscription changes

* Fixed tests

---------

Co-authored-by: Adrià Casajús <adria.casajus@proton.ch>
2023-05-26 15:33:55 +02:00
Son Nguyen Kim 62ba2844f3 add admin page for InvalidMailboxDomain (#1573)
* add admin page for InvalidMailboxDomain

* show creation and modification date for InvalidMailboxDomain
2023-02-15 10:38:18 +01:00
Adrià Casajús 9378b8a17d Fix: Return email in the get_communication_email always and search for the alias when needed (#1497)
Co-authored-by: Adrià Casajús <adria.casajus@proton.ch>
2022-12-19 09:23:53 +01:00
Adrià Casajús 73c0429cad Fix: Set oneclick link for unsubscribe of the newsletter for tx emails (#1465)
* Feat: Add unsub oneclick to the base transactional email template

* Format

* Removed unused

* Format

Co-authored-by: Adrià Casajús <adria.casajus@proton.ch>
2022-12-13 16:59:14 +01:00
Adrià Casajús 7f9ce5641f Feat: Added parallel limiter to prevent sqlalchemy transaction issues (#1360)
* 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>
2022-10-27 10:07:02 +02:00
Son Nguyen Kim 35470613d3 add DailyMetric and Metric as admin page, remove EmailLog admin page (#1352) 2022-10-15 19:10:39 +02:00
Adrià Casajús faaff7e9b9 Handle failed payments subscriptions in paddle (#1327)
* Handle failed payments subscriptions in paddle

* Added tests

* Remove unused import

* Remove unused import

Co-authored-by: Adrià Casajús <adria.casajus@proton.ch>
2022-09-30 17:51:06 +02:00
Adrià Casajús b5aff490ef Store session in redis if redis is enabled (#1288)
* 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>
2022-09-21 11:11:17 +02:00
Son Nguyen Kim 69d5de8d41 fix paddle refund (#1213) 2022-08-02 12:43:48 +02:00
Son Nguyen Kim abe0e0fc46 fix memory error, deleted user when sending newsletter (#1199) 2022-08-01 20:38:13 +02:00
Son Nguyen Kim 125538748d command send newsletter (#1184) 2022-07-25 11:16:40 +02:00
Son Nguyen Kim 6322e03996 admin can manage newsletter and test sending it (#1177)
* admin can manage newsletter and test sending it

* add comments

* comment

* doc

* not userID not specified, send the newsletter to current user

* automatically match textarea height to content when editing newsletter

* increase text height and limit img size to 100% in email template

* admin can send newsletter to a specific address
2022-07-22 11:24:53 +02:00
Son Nguyen Kim c5773af6a8 remove 15 hardcoding (#1164) 2022-07-19 15:09:46 +02:00
Adrià Casajús afb2ab3758 Allow to configure mem storage from config (#1166)
* Allow to configure memory storage from config

* format

Co-authored-by: Adrià Casajús <adria.casajus@proton.ch>
2022-07-19 08:25:59 +02:00
Adrià Casajús 2837350204 Limit amount of imports (#1161)
* Limit amount of imports

* Review suggestions

* Format

Co-authored-by: Adrià Casajús <adria.casajus@proton.ch>
2022-07-16 18:17:15 +02:00
Adrià Casajús bcd4383e05 Sanitize the highlight contact id (#1160)
* Sanitize also parameter

* Formatting

Co-authored-by: Adrià Casajús <adria.casajus@proton.ch>
2022-07-15 17:48:42 +02:00
Son Nguyen Kim 8fffe72910 fix refund callback (#1143)
fix https://sentry.io/organizations/simplelogin/issues/3370469626/?alert_rule_id=2478639&alert_timestamp=1656988438946&alert_type=email&environment=production&project=1868546&referrer=alert_email
2022-07-05 10:14:30 +02:00
Carlos Quintana 58990ec762 Hide proton integration behind cookie (#1092)
* Hide proton integration behind cookie

* Make cookie name configurable via config
2022-06-15 15:42:41 +02:00
Son Nguyen Kim 715ce33b09 handle subscription_payment_refunded event (#1075) 2022-06-14 09:41:49 +02:00
Son 3897d723ea remove flask-sqlalchemy and upgrade sqlalchemy from 1.3.19 to 1.3.24 2022-05-23 14:41:06 +02:00
Carlos Quintana 3872626747 Add proton partner on dummy data 2022-05-13 08:29:20 +02:00