refactor(authorization): unify own_data read check across linked resources

This commit is contained in:
Moritz 2026-06-16 14:56:07 +02:00 committed by moritz
parent 924dbd3bb8
commit 164826d3aa
5 changed files with 76 additions and 127 deletions

View file

@ -88,7 +88,7 @@ defmodule Mv.MembershipFees.MembershipFeeCycle do
policies do
bypass action_type(:read) do
description "own_data: read only cycles where member_id == actor.member_id"
authorize_if Mv.Authorization.Checks.MembershipFeeCycleReadLinkedForOwnData
authorize_if {Mv.Authorization.Checks.ReadLinkedForOwnData, member_id_field: :member_id}
end
policy action_type([:read, :create, :update, :destroy]) do