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

This commit is contained in:
Moritz 2026-06-16 14:56:07 +02:00
parent 7d712f6ce2
commit 070d9d1fc3
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