Skip to content

Commit fd3f204

Browse files
committed
bugfix
1 parent d18a8d9 commit fd3f204

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

src/handlers/http/query.rs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ use std::collections::HashMap;
2929
use std::pin::Pin;
3030
use std::sync::Arc;
3131
use std::time::Instant;
32-
use tracing::{error, trace};
32+
use tracing::error;
3333

3434
use crate::event::error::EventError;
3535
use crate::handlers::http::fetch_schema;
@@ -85,7 +85,7 @@ pub async fn query(req: HttpRequest, query_request: Query) -> Result<impl Respon
8585
let time_range =
8686
TimeRange::parse_human_time(&query_request.start_time, &query_request.end_time)?;
8787

88-
// create a visitor to extract the table name
88+
// create a visitor to extract the table names present in query
8989
let mut visitor = TableScanVisitor::default();
9090
let _ = raw_logical_plan.visit(&mut visitor);
9191

@@ -153,17 +153,15 @@ pub async fn create_streams_for_querier() {
153153
}
154154
}
155155

156-
// check auth for each table in the tables vector
157156
pub fn authorize_and_set_filter_tags(
158157
query: &mut LogicalQuery,
159158
permissions: Vec<Permission>,
160-
tables: &Vec<String>,
159+
tables: &[String],
161160
) -> Result<(), QueryError> {
162-
// check authorization of this query if it references physical table;
163-
let mut authorized = false;
164-
165-
trace!("table names in auth- {tables:?}");
166161
for table_name in tables.iter() {
162+
// check authorization of this query if it references physical table;
163+
let mut authorized = false;
164+
167165
let mut tags = Vec::new();
168166

169167
// in permission check if user can run query on the stream.

0 commit comments

Comments
 (0)