@@ -29,7 +29,7 @@ use std::collections::HashMap;
29
29
use std:: pin:: Pin ;
30
30
use std:: sync:: Arc ;
31
31
use std:: time:: Instant ;
32
- use tracing:: { error, trace } ;
32
+ use tracing:: error;
33
33
34
34
use crate :: event:: error:: EventError ;
35
35
use crate :: handlers:: http:: fetch_schema;
@@ -85,7 +85,7 @@ pub async fn query(req: HttpRequest, query_request: Query) -> Result<impl Respon
85
85
let time_range =
86
86
TimeRange :: parse_human_time ( & query_request. start_time , & query_request. end_time ) ?;
87
87
88
- // create a visitor to extract the table name
88
+ // create a visitor to extract the table names present in query
89
89
let mut visitor = TableScanVisitor :: default ( ) ;
90
90
let _ = raw_logical_plan. visit ( & mut visitor) ;
91
91
@@ -153,17 +153,15 @@ pub async fn create_streams_for_querier() {
153
153
}
154
154
}
155
155
156
- // check auth for each table in the tables vector
157
156
pub fn authorize_and_set_filter_tags (
158
157
query : & mut LogicalQuery ,
159
158
permissions : Vec < Permission > ,
160
- tables : & Vec < String > ,
159
+ tables : & [ String ] ,
161
160
) -> 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:?}" ) ;
166
161
for table_name in tables. iter ( ) {
162
+ // check authorization of this query if it references physical table;
163
+ let mut authorized = false ;
164
+
167
165
let mut tags = Vec :: new ( ) ;
168
166
169
167
// in permission check if user can run query on the stream.
0 commit comments