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