canDo('advert.advert.approve')) { return true; } return false; } /** * Determine if the given user can approve the given advert. * * @param UserPolicyInterface $authUser * * @return bool */ public function submit(UserPolicyInterface $authUser, Advert $advert) { if ($authUser->canDo('advert.advert.submit')) { return true; } return false; } /** * Determine if the given user can approve the given advert. * * @param UserPolicyInterface $authUser * * @return bool */ public function publish(UserPolicyInterface $authUser, Advert $advert) { if ($authUser->canDo('advert.advert.publish')) { return true; } return false; } /** * Determine if the given user can approve the given advert. * * @param UserPolicyInterface $authUser * * @return bool */ public function unpublish(UserPolicyInterface $authUser, Advert $advert) { if ($authUser->canDo('advert.advert.unpublish')) { return true; } return false; } /** * Determine if the given user can approve the given advert. * * @param UserPolicyInterface $authUser * * @return bool */ public function archive(UserPolicyInterface $authUser, Advert $advert) { if ($authUser->canDo('advert.advert.archive')) { return true; } return false; } /** * Determine if the given user can approve the given advert. * * @param UserPolicyInterface $authUser * * @return bool */ public function unarchive(UserPolicyInterface $authUser, Advert $advert) { if ($authUser->canDo('advert.advert.unarchive')) { return true; } return false; } /** * Determine if the given user can approve the given advert. * * @param UserPolicyInterface $authUser * * @return bool */ public function reject(UserPolicyInterface $authUser, Advert $advert) { if ($authUser->canDo('advert.advert.reject')) { return true; } return false; } }