public function validate_user_can_query_private_statuses( $value, $request, $parameter ) {
		if ( 'publish' === $value ) {
			return true;
		}
		$post_type_obj = get_post_type_object( $this->post_type );
		if ( current_user_can( $post_type_obj->cap->edit_posts ) ) {
			return true;
		}
		return new WP_Error( 'rest_forbidden_status', __( 'Status is forbidden.' ), array( 'status' => rest_authorization_required_code() ) );
	}
public function validate_user_can_query_private_statuses( $value, $request, $parameter ) {
		if ( 'publish' === $value ) {
			return true;
		}
		$post_type_obj = get_post_type_object( $this->post_type );
		if ( current_user_can( $post_type_obj->cap->edit_posts ) ) {
			return true;
		}
		return new WP_Error( 'rest_forbidden_status', __( 'Status is forbidden.' ), array( 'status' => rest_authorization_required_code() ) );
	}
public function validate_user_can_query_private_statuses ( $ value , $ request , $ parameter ) { if ( 'publish' === $ value ) { return true ; } $ post_type_obj = get_post_type_object ( $ this -> post_type ) ; if ( current_user_can ( $ post_type_obj -> cap -> edit_posts ) ) { return true ; } return new WP_Error ( 'rest_forbidden_status' , __ ( 'Status is forbidden.' ) , array ( 'status' => rest_authorization_required_code ( ) ) ) ; }
Validate whether the user can query private statuses.

@param  mixed           $value     Post status.
@param  WP_REST_Request $request   Full details about the request.
@param  string          $parameter
@return WP_Error|boolean
Validate whether the user can query private statuses .