canDo('aml.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('aml.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('aml.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('aml.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('aml.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('aml.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('aml.deal.reject')) { return true; } return false; } }