When applying a scope to a query, all the available data must be set on the IdentityInterface or user object which can be tedious especially if they conflict with fields in the identity/user.
Can we pass an extra parameter of options to applyScope()?
applyScope(?IdentityInterface $user, string $action, $resource, $options = [])
This would function similar to finders that accept an array of options that can be used to build the query.
An example use case is page-specific overrides to user options that are not persisted to the user. These can be manually applied to the query, however, that adds 2 sets of authorization logic to the same query which can introduce bugs.
When applying a scope to a query, all the available data must be set on the
IdentityInterfaceor user object which can be tedious especially if they conflict with fields in the identity/user.Can we pass an extra parameter of options to
applyScope()?This would function similar to finders that accept an array of options that can be used to build the query.
An example use case is page-specific overrides to user options that are not persisted to the user. These can be manually applied to the query, however, that adds 2 sets of authorization logic to the same query which can introduce bugs.