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