Oxygen Password Condicion javascript

                  if( function_exists('oxygen_vsb_register_condition') ) {

	global $oxy_condition_operators;

	oxygen_vsb_register_condition('Has Password', array('options'=>array('true', 'false'), 'custom'=>false), array('=='), 'has_password_callback', 'Post');

	function has_password_callback($value, $operator) {

		if( $value == "true" && post_password_required( get_the_ID() ) ) {
		  return true;
		} else if( $value == "false" && !post_password_required( get_the_ID() ) ) {
		  return true;
		} else {
		  return false;
		}

	}

}