refactor(authorization): unify own_data read check across linked resources
This commit is contained in:
parent
7d712f6ce2
commit
070d9d1fc3
5 changed files with 76 additions and 127 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue