MembershipFeeCycle: own_data read :linked via bypass and HasPermission scope

- own_data gets read scope :linked; apply_scope in HasPermission; bypass check for own_data.
- PermissionSetsTest expects own_data :linked, others :all for MFC read.
This commit is contained in:
Moritz 2026-02-04 09:20:10 +01:00
parent 890a4d3752
commit 178f5a01c7
6 changed files with 140 additions and 6 deletions

View file

@ -351,6 +351,10 @@ defmodule Mv.Authorization.Checks.HasPermission do
# MemberGroup.member_id → Member.id → User.member_id (own linked member's group associations)
linked_filter_by_member_id(actor, :member_id)
"MembershipFeeCycle" ->
# MembershipFeeCycle.member_id → Member.id → User.member_id (own linked member's cycles)
linked_filter_by_member_id(actor, :member_id)
_ ->
# Fallback for other resources
{:filter, expr(user_id == ^actor.id)}