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

@ -63,7 +63,7 @@ defmodule Mv.Membership.MemberGroup do
policies do
bypass action_type(:read) do
description "own_data: read only member_groups where member_id == actor.member_id"
authorize_if Mv.Authorization.Checks.MemberGroupReadLinkedForOwnData
authorize_if {Mv.Authorization.Checks.ReadLinkedForOwnData, member_id_field: :member_id}
end
policy action_type(:read) do