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
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue