parseAuthorizationArguments makes it impossible to specify custom policy
I want to specify a custom policy to check against in my
->authorize()
in a relation manager.
In the trait CanBeAuthorized
the following code is present:
This code always prepends the current model class to the arguments array.
This causes the passed $this->getOwnerRecord()
to be treated as an argument instead of the class to check the policy against.
How can I authorize against a policy I choose?Solution:Jump to solution
We ended up solving this by creating another model which extends media and using that in the relationship.
1 Reply
Solution
We ended up solving this by creating another model which extends media and using that in the relationship.