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