Commit Graph
25 Commits
Author SHA1 Message Date
Herculino Trotta e2f26b3629 fix(sharing): enforce object-level authorization outside the rules app
The rules endpoints were one instance of a pattern repeated across every
SharedObject-backed app. Route the rest through the same helper.

DCA entries were the worst case and are strictly wider than the reported
rules bug: DCAEntry has an unscoped default manager, so filtering by
strategy__id alone reached entries on strategies the caller could not see
at all. No public or shared strategy was needed -- only a guessable
integer. strategy_entry_add/edit/delete now resolve through the parent
strategy with via="strategy".

Every SharedObject delete view carried an inverted condition:

    if obj.owner != request.user and request.user in obj.shared_with.all():
        obj.shared_with.remove(request.user)
    else:
        obj.delete()

An object its owner had made public matched neither branch's intent and
fell through to delete(), so any authenticated user could destroy it.
Confirmed reachable for accounts, account groups, categories, tags,
entities and DCA strategies. The owner now deletes, a shared user revokes
only their own access, and anyone else gets a 403.

The API viewsets had no object-level check at all. DjangoModelPermissions
gated them shut for ordinary users, who hold no model permissions, so this
was not reachable in a default install -- but the check belongs there
regardless, and a user granted change_account in the admin could write any
visible account. SharedObjectPermission adds it for the SharedObject
viewsets, leaving reads to SharedObjectManager.

account_toggle_untracked only flips the calling user's own row in the
untracked_by m2m, so it takes READ rather than EDIT.

Refs GHSA-83g9-vjqf-2j5q
2026-09-01 23:15:41 -03:00
Herculino Trotta 01f91352d6 feat(transactions:filter): make montlhy summary filter-aware 2025-12-28 13:20:25 -03:00
Herculino Trotta 2076903740 refactor: order management lists by name instead of id 2025-12-27 23:43:57 -03:00
Herculino Trotta 0b0d760bab feat: guess what, more changes 2025-11-11 20:21:01 -03:00
Herculino Trotta cd54df6f2d feat: more changes and fixes 2025-11-08 14:06:01 -03:00
Herculino Trotta 89b2d0118d feat: another batch of fixes 2025-11-02 03:03:22 -03:00
Herculino Trotta a63367a772 feat: first batch of work 2025-11-01 03:15:44 -03:00
Herculino Trotta 5b6c123fa1 refactor: properly name shareable objects generic fields 2025-07-27 23:19:39 -03:00
Herculino Trotta 020dd74f80 feat: multi tenancy support 2025-03-08 12:03:17 -03:00
Herculino Trotta 865618e054 feat(dca): link transactions to DCA 2025-02-15 00:41:06 -03:00
Herculino Trotta 187c56c96c refactor: remove user attr from datepicker
since monkey patched get_format already does what we want
2025-01-27 13:25:06 -03:00
Herculino Trotta 97465c07fe fix: import preset not working behind nginx due to long url/csrf missing 2025-01-24 16:06:47 -03:00
Herculino Trotta 60fe4c9681 feat(app): allow changing date and datetime format as a user setting 2025-01-20 19:35:22 -03:00
Herculino Trotta 6955294283 feat(datepicker): drop native datepickers in favor of AirDatePicker for better compatibility
As Firefox (still) doesn't support month input type
2025-01-14 23:47:03 -03:00
Herculino Trotta 0b60f73e44 refactor: remove duplicate calculation 2024-12-13 23:27:54 -03:00
Herculino Trotta da10f461a6 refactor: drop toast(s) custom event as toasts listen to updated now 2024-11-30 00:35:20 -03:00
Herculino Trotta 53de8e7851 fix: missing DCA charts 2024-11-16 09:52:34 -03:00
Herculino Trotta 90aceda9aa feat: add currencies to DCA list 2024-11-15 22:32:32 -03:00
Herculino Trotta 2c15a284af feat: add current price and other info to DCA strategy detail 2024-11-15 22:24:07 -03:00
Herculino Trotta 0493ec34e8 refactor: remove debug prints 2024-11-13 12:41:53 -03:00
Herculino Trotta 759b2a5f13 fix: DCA not getting most recent value 2024-11-13 12:41:18 -03:00
Herculino Trotta 0c67405f3e feat: multiple improvements and new charts for DCA 2024-11-13 00:55:44 -03:00
Herculino Trotta 5ee4518f30 fix: DCA Tracker using wrong templates for editing 2024-11-12 13:02:33 -03:00
Herculino Trotta ba52e8740f feat: finish adding DCA Tracker tool 2024-11-12 11:40:50 -03:00
Herculino Trotta 7ebe3b6b5b feat: initial work for DCA tool 2024-11-12 00:13:27 -03:00