Commit Graph

99 Commits

Author SHA1 Message Date
Copilot 9f101a13ff Split settings usage stats by organization (#256)
* Initial plan

* Split account stats by organization

Co-authored-by: ribtoks <505555+ribtoks@users.noreply.github.com>

* Fix usage chart layout and stats handler

Co-authored-by: ribtoks <505555+ribtoks@users.noreply.github.com>

* Address code review feedback

Co-authored-by: ribtoks <505555+ribtoks@users.noreply.github.com>

* Clarify account stats warning log

Co-authored-by: ribtoks <505555+ribtoks@users.noreply.github.com>

* Adjust stats logging and legend layout

Co-authored-by: ribtoks <505555+ribtoks@users.noreply.github.com>

* Move legend sizing constants

Co-authored-by: ribtoks <505555+ribtoks@users.noreply.github.com>

* Document legend sizing constants

Co-authored-by: ribtoks <505555+ribtoks@users.noreply.github.com>

* Refine legend text measurement

Co-authored-by: ribtoks <505555+ribtoks@users.noreply.github.com>

* Improve legend truncation and logging

Co-authored-by: ribtoks <505555+ribtoks@users.noreply.github.com>

* Cosmetic improvements

* Refactor legend layout logic

Co-authored-by: ribtoks <505555+ribtoks@users.noreply.github.com>

* Tweak legend row spacing

Co-authored-by: ribtoks <505555+ribtoks@users.noreply.github.com>

* Clarify legend layout fields

Co-authored-by: ribtoks <505555+ribtoks@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: ribtoks <505555+ribtoks@users.noreply.github.com>
Co-authored-by: Taras Kushnir <tk.dev@mailbox.org>
2026-01-17 09:56:46 +02:00
Taras Kushnir 0f70c38529 Add more tests
80% done by Claude Opus 4.5 w/ copilot, but not quite
2026-01-15 14:35:13 +02:00
Taras Kushnir 5cffff09d8 Use status recorder also for recovered middleware 2026-01-12 19:11:09 +02:00
Taras Kushnir d1c0a1afcb Split timeout handler into soft and hard
- fix potential superfluous writes like the stdlib http.TimeoutHandler
- we don't want to run extra goroutines on public unauthenticated methods
2026-01-12 12:13:02 +02:00
Taras Kushnir e1f0e612f3 Use standard timeout handler 2026-01-11 15:51:04 +02:00
Taras Kushnir 3f3c0988bf Add more tests
With copilot. Merged maually due to bugs
2026-01-10 17:42:05 +02:00
Taras Kushnir 5926536d2c Revert redirect 'fix' 2026-01-10 12:13:47 +02:00
Taras Kushnir 27495ae7ee Cosmetic improvements 2026-01-10 12:04:42 +02:00
Taras Kushnir 8442b9e7b2 Allow inviting users without accounts. closes PrivateCaptcha/issues#227 2026-01-10 09:51:54 +02:00
Taras Kushnir f02b7fca9e Remove unused code 2026-01-09 15:54:12 +02:00
Copilot 7d1247848b Add organization transfer feature (#240)
* Initial plan

* Initial plan for organization transfer feature

Co-authored-by: ribtoks <505555+ribtoks@users.noreply.github.com>

* Add organization transfer feature with UI, DB layer, and integration test

Co-authored-by: ribtoks <505555+ribtoks@users.noreply.github.com>

* Address PR feedback: verify old owner in property transfer, swap org membership, show masked email in audit, add negative tests

Co-authored-by: ribtoks <505555+ribtoks@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: ribtoks <505555+ribtoks@users.noreply.github.com>
2026-01-08 20:25:09 +02:00
Copilot d00d9ce9cb Add unit and integration tests for code coverage improvements (#238)
* Initial plan

* Initial planning for code coverage improvements

Co-authored-by: ribtoks <505555+ribtoks@users.noreply.github.com>

* Add unit tests for code coverage improvements

Co-authored-by: ribtoks <505555+ribtoks@users.noreply.github.com>

* Fix integration test failures and add more tests for code coverage

Co-authored-by: ribtoks <505555+ribtoks@users.noreply.github.com>

* Address code review feedback - simplify status code conversion

Co-authored-by: ribtoks <505555+ribtoks@users.noreply.github.com>

* Address PR review feedback: use config.NewStaticValue() and improve test assertions

Co-authored-by: ribtoks <505555+ribtoks@users.noreply.github.com>

* Add remaining tests: ChunkedCleanup, audit_enterprise, echoPuzzle

Co-authored-by: ribtoks <505555+ribtoks@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: ribtoks <505555+ribtoks@users.noreply.github.com>
2026-01-07 18:29:04 +02:00
Taras Kushnir f534ee7ec5 Add a mode to run tests without ClickHouse 2026-01-06 15:46:24 +02:00
Taras Kushnir acc2e09427 Add timeout config for periodic jobs 2025-12-25 13:33:19 +01:00
Taras Kushnir cbdc994e0d Add Org scope to API keys. closes PrivateCaptcha/issues#237 2025-12-22 18:54:47 +01:00
Taras Kushnir 727fbfa93e Preallocate map size 2025-12-22 12:47:18 +01:00
Taras Kushnir 24b43ade8f Refactor email verification 2025-12-19 10:36:09 +01:00
Taras Kushnir 3475c9c1e2 Add API to batch-update properties. related PrivateCaptcha/issues#45 2025-12-18 14:28:55 +01:00
Taras Kushnir a01792ffd8 Add API to get properties. related PrivateCaptcha/issues#45 2025-12-17 19:16:18 +01:00
Taras Kushnir d1ac04d09d Cosmetic improvements
some found by CodeRabbit review
2025-12-17 19:00:37 +01:00
Taras Kushnir b959c00af8 Add create properties bulk API. related PrivateCaptcha/issues#45 2025-12-15 15:43:05 +01:00
Taras Kushnir 85ca8c5a7a Add preliminary basic version of orgs API. related PrivateCaptcha/issues#45 2025-12-10 21:15:02 +01:00
Taras Kushnir 3b208240dc Fix typo 2025-12-10 21:15:02 +01:00
Taras Kushnir 9effd7a5df Refactor API server routes mounting 2025-12-08 17:45:52 +01:00
Taras Kushnir e8bf52f858 Move RouteGenerator to common 2025-12-08 17:27:28 +01:00
Taras Kushnir f0db3be14d Add audit log source 2025-12-08 13:34:20 +01:00
Taras Kushnir 57636bbf48 Add API key scope 2025-12-08 12:44:42 +01:00
Taras Kushnir 9151c22370 Cache chart stats also on the server level 2025-12-07 20:13:18 +01:00
Taras Kushnir 55377576e2 Cache chart stats responses on CDN level 2025-12-07 17:53:30 +01:00
Taras Kushnir cbab265d85 Send verify response instead of http code for sitekey verification 2025-12-02 21:42:01 +01:00
Taras Kushnir da93cf591b Check expected sitekey in /verify 2025-12-02 18:52:43 +01:00
Taras Kushnir b0bbb3957b Make audit logs retention configurable 2025-11-26 15:36:10 +02:00
Taras Kushnir 07b5c24e96 Add ability to set TTL when loading through cache 2025-11-24 08:15:25 +02:00
Taras Kushnir 4ad20a5b3c Cosmetic improvements 2025-11-23 07:33:39 +02:00
Taras Kushnir fa8422d1c7 Add basic auditlogs implementation. closes PrivateCaptcha/issues#204 2025-11-22 19:39:18 +02:00
Viktor Szépe c2990f579b Correct misspellings (#217) 2025-11-19 09:40:16 +02:00
Taras Kushnir 16e4244077 Add functionality to backfill potential stale session in portal
Also get rid of unnecessary changes from previous commit
2025-11-16 21:09:16 +02:00
Taras Kushnir 43a01e877a Add more details to 2fa email. closes PrivateCaptcha/issues#207 2025-11-15 09:21:26 +02:00
Taras Kushnir fa927a2ff0 Fix CodeQL suggestion 2025-11-13 10:08:25 +02:00
Taras 798dfbcd51 Potential fix for code scanning alert no. 20: Incorrect conversion between integer types
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2025-11-13 10:05:14 +02:00
Taras Kushnir fec15377b4 Add fallback for empty ID hasher salt 2025-11-13 09:58:01 +02:00
Taras Kushnir f54578d513 Hide internal identifiers in URLs. closes PrivateCaptcha/issues#209 2025-11-12 15:38:09 +02:00
Taras Kushnir 9b3aa0ea94 Add functionality to move property. closes PrivateCaptcha/issues#151 2025-11-11 18:16:40 +02:00
Taras Kushnir a016ef1a2b Add crossorigin attribute to portal scripts. related PrivateCaptcha/issues#206 2025-11-11 10:00:41 +02:00
Taras Kushnir 7dc6f65d2e Add a separate metrics for before-redirect http errors in portal 2025-11-09 12:54:00 +02:00
Taras Kushnir a05a7563a9 Add cosmetic spot check for the most stupid bots 2025-10-16 13:06:29 +03:00
Taras Kushnir 6064339634 Send email when invited to organization. closes PrivateCaptcha/issues#96 2025-10-09 10:22:54 +03:00
Taras Kushnir fbe38a2292 Add paranoid int32 checks to make GitHub CodeQL happy 2025-10-04 17:27:02 +03:00
Taras Kushnir 70ed850c24 Move XSRF key to config
found by ZeroPath
2025-10-04 12:41:01 +03:00
Taras Kushnir 81dc447640 Add ETag header for assets and scripts 2025-09-24 12:19:38 +03:00