is($this->model->owner())) { return true; } if ($authUser->canDo('maintenance.vendor.action.copy')) { return true; } return false; } /** * Determine if the given user can approve the given vendor. * * @param UserPolicyInterface $authUser * * @return bool */ function empty(UserPolicyInterface $authUser, Vendor $vendor) { if ($authUser->is($this->model->owner())) { return true; } if ($authUser->canDo('maintenance.vendor.action.empty')) { return true; } return false; } /** * Determine if the given user can approve the given vendor. * * @param UserPolicyInterface $authUser * * @return bool */ public function transfer(UserPolicyInterface $authUser, Vendor $vendor) { if ($authUser->is($this->model->owner())) { return true; } if ($authUser->canDo('maintenance.vendor.action.transfer')) { return true; } return false; } /** * Determine if the given user can approve the given vendor. * * @param UserPolicyInterface $authUser * * @return bool */ public function delete(UserPolicyInterface $authUser, Vendor $vendor) { if ($authUser->canDo('maintenance.vendor.action.delete')) { return true; } return false; } }