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