Fix bulk update validation & authorization per item and their relations#716
Conversation
|
@george-todica is attempting to deploy a commit to the BinarCode Team on Vercel. A member of the Team first needs to authorize it. |
PR Summary
|
# Conflicts: # src/Http/Controllers/RepositoryUpdateBulkController.php
Summary
$post->user_id) and relations ($post->user->email)Problem
The
updateBulkpolicy method was not receiving the$postmodel, preventing authorization checks like:$post->user_id === $user->id$post->user->emailSolution
$postparameter toPostPolicy::updateBulk()to receive model fromGate::check('updateBulk', $this->resource)$this->resourcecontains the actual model