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