Commit graph

26 commits

Author SHA1 Message Date
Bohdan Shtepan
4975c89066
SL abuser system improvements (#2494)
* IDTEAM-4828: Allow to search abuser by user id not just by email.

* IDTEAM-4827: Add abuser admin logs to abuser page.

* IDTEAM-4826: Run the abuser bundle generation in a job with low prio.
2025-06-11 10:53: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
6b0c920c03
fix: admin panel delete domain and time calculation (#2449)
* fix(admin): only show delete domain if domain is not pending to be deleted

* fix(oneshot): oneshot script removal and time calculation fix
2025-05-05 09:29:46 +00:00
Carlos Quintana
8369e9e216
fix: schedule subscription job fixes (#2447) 2025-04-30 11:55:13 +02:00
Carlos Quintana
b0562e3b8a
fix: time calculation division check (#2446) 2025-04-30 09:15:50 +00:00
Adrià Casajús
3e3931104b
schedule job script fixes (#2445)
Co-authored-by: Carlos Quintana <74399022+cquintana92@users.noreply.github.com>
2025-04-30 08:48:27 +00:00
Carlos Quintana
b4945bde33
feat: add job to schedule subscription sync (#2443) 2025-04-30 10:08:11 +02:00
Carlos Quintana
9940d04758
feat: add script to send sync user jobs (#2402) 2025-02-27 09:54:45 +01:00
Carlos Quintana
59957ec08b
chore: fix regex warnings on python 3.12 (#2400)
* deps: update some dependencies to fix warnings

* chore: move from sl.local to sl.lan for local development

* fix: mark string as regex

* chore: move facebook import to handler so its not global

* test: fix tests

* style: lint fixes

* test: move all .test and .local to .lan

* ci: do not use setup-python in lint
2025-02-26 15:41:50 +01:00
Adrià Casajús
a908e1cd18
Tweak lifetime command 2025-02-11 15:00:11 +01:00
Adrià Casajús
f232a2af89
Refactor coupon management and send proper events (#2363)
* Refactor coupon management and send proper events

* Refactor coupon management and send proper events

* Add missing case

* Updated with comments

* Use model table names

* renamed tablename to table

* Use sqlalchemy
2025-01-23 12:36:13 +01:00
Adrià Casajús
7f01dec491
Send plan change on account link (#2303) 2024-11-05 13:44:12 +00:00
Adrià Casajús
f7b7b6d222
Send limit for lifetime that fitx in u32 (#2302) 2024-11-05 14:16:57 +01:00
Adrià Casajús
0eca359012
Speedup the script to send lifetime to proton 2024-11-05 12:29:54 +01:00
Adrià Casajús
9920ed0538
FIX: use arrow timestamp not arrow directly (#2301) 2024-11-05 11:21:06 +00:00
Adrià Casajús
18a299f1d2
Add lifetime case to events 2024-11-05 11:53:46 +01:00
Adrià Casajús
17c0af33e4
Send lifetime status also to proton (#2300) 2024-11-05 11:42:20 +01:00
Adrià Casajús
3c13f1ce20
Have the dead letter also take events to avoid race conditions (#2267)
* Have the dead letter also take events to avoid race conditions

* Ensure we take the event

* Tests for event taken

* Rename
2024-10-17 09:16:33 +00:00
Carlos Quintana
bdb0c8bd08
feat: alias audit log (#2261)
* feat: alias audit log

* feat: crontab to delete old alias_audit_log entries

* Unified messages

---------

Co-authored-by: Adrià Casajús <adria.casajus@proton.ch>
2024-10-14 12:45:00 +02:00
Adrià Casajús
025d4feba0
Sync on partner user creation + several fixes (#2214)
* Do not close session since it leads to orphan user object

* Redirect instead of render to avoid having to have a mailbox object

* On inital partner link/login trigger sync

* Update github action upload/artifact to v4

* Remove sys.exit used to test script locally

* Simplified script to update alias flags and note
2024-09-12 16:58:20 +02:00
Adrià Casajús
faae37b6bc
Use partner emails when the user has used alias from a partner (#2136)
* Update base templates based on the parter user

* Update template

* Fix missing check

* Check if the user is set

* Hide flag usage
2024-06-28 13:34:16 +00:00
Adrià Casajús
74b811dd35
Update oneshot commands (#2060)
* Update oneshot commands

* fix

* Fix test_load command

* Rename to avoid test executing it
2024-03-14 11:11:50 +01:00
Adrià Casajús
e96de79665
Add missing indexes and mark aliases as created by partner (#2058)
* Add missing indexes and mark aliases as created by partner

* Configure if we should skip the partner aliases or not
2024-03-13 14:30:17 +01:00
Adrià Casajús
97e68159c5
Fix: Never use NOREPLY to create contacts (#2039) 2024-02-27 09:29:53 +01:00
Adrià Casajús
d0a6b8ed79
Add start and end flags to parallelize call (#2033) 2024-02-19 16:46:35 +01:00
Adrià Casajús
50c130a3a3
Store the latest email_log id in the alias to simplify dashboard query (#2022)
* 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>
2024-02-15 15:48:02 +01:00