Commit Graph
29 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 2076903740 refactor: order management lists by name instead of id 2025-12-27 23:43:57 -03:00
Herculino Trotta d3a816d91b feat(api): add endpoints for importing files and getting account balance 2025-12-07 00:32:18 -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 64b32316ca fix(accounts): unable to update accounts
due to wrong currency queryset
2025-09-08 09:19:17 -03:00
Herculino Trotta 1abe9e9f62 feat(currencies): allow archiving 2025-08-29 22:47:00 -03:00
Herculino Trotta 55c4b920ee feat(accounts): add option for untracking accounts on a per user basis 2025-08-09 03:35:39 -03:00
google-labs-jules[bot] 7f8261b9cc refactor: Style transaction items for untracked accounts
This commit extends the "Untrack Account" feature by applying a special style to transaction items that belong to an untracked account.

- The transaction item template is modified to apply a "dimmed" style to transactions from untracked accounts.
- The styling follows the precedence: Account (untracked) > Category (muted) > Transaction (hidden).
- The dropdown menu for transaction items now shows "Controlled by account" if the transaction's account is untracked.
2025-08-09 05:47:18 +00:00
Herculino Trotta 5b6c123fa1 refactor: properly name shareable objects generic fields 2025-07-27 23:19:39 -03:00
Herculino Trotta 5d64665ddd fix(accounts): unable to share some accounts; wrong url getting used 2025-04-21 14:33:11 -03:00
Herculino Trotta 73e8fdbf04 feat: alphabetically order most models by default
#207
2025-03-09 18:55:29 -03:00
Herculino Trotta 020dd74f80 feat: multi tenancy support 2025-03-08 12:03:17 -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 ba2d654f15 feat(accounts): make account names unique 2025-01-23 22:03:02 -03:00
Herculino Trotta 93d04572df feat(accounts): make account names unique 2025-01-23 22:02:45 -03:00
Herculino Trotta 3c0a2d82ac feat: allow for deactivating Tags, Categories and Entities, hiding them from menus 2025-01-04 18:13:11 -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 b504d7fdcb feat: prevent exchange rate currencies from being the same as currency 2024-11-17 21:46:42 -03:00
Herculino Trotta bb17b4ba83 test: add starting tests 2024-11-01 17:23:57 -03:00
Herculino Trotta bfd0cc45a3 feat: add option to archive accounts 2024-10-27 21:54:02 -03:00
Herculino Trotta b77e48ef42 feat: show account group on account reconciliation form 2024-10-20 11:55:52 -03:00
Herculino Trotta 07cbfefb95 changes, fixes and improvements 2024-10-16 00:16:48 -03:00
Herculino Trotta d20897a28a more changes 2024-10-13 12:10:50 -03:00
Herculino Trotta fe9682aa65 locale: improve and fix translations 2024-10-11 11:26:41 -03:00
Herculino Trotta 5b66ac7fac refactor: move some fields and widgets around 2024-10-10 22:37:10 -03:00
Herculino Trotta 3dde44b1cd changes 2024-10-09 00:31:21 -03:00
Herculino Trotta 50b0c6ce01 initial commit 2024-09-26 11:00:40 -03:00