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