contract ConditionalEscrow is Escrow {
    /**
     * @dev Returns whether an address is allowed to withdraw their funds. To be
     * implemented by derived contracts.
     * @param payee The destination address of the funds.
     */
    function withdrawalAllowed(address payee) public view returns (bool);

    function withdraw(address payable payee) public {
        require(withdrawalAllowed(payee));
        super.withdraw(payee);
    }
}
function withdrawalAllowed(address payee) public view returns (bool);

/**
 * @dev Returns whether an address is allowed to withdraw their funds. To be
 * implemented by derived contracts.
 * @param payee The destination address of the funds.
 */