File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -180,13 +180,9 @@ impl Filters {
180180 let read = self . 0 . read ( ) . await ;
181181
182182 let mut filters = Vec :: new ( ) ;
183-
183+ let permissions = Users . get_permissions ( key ) ;
184184 for f in read. iter ( ) {
185- let query = if let Some ( q) = & f. query . filter_query {
186- q
187- } else {
188- & String :: default ( )
189- } ;
185+ let query: & str = f. query . filter_query . as_deref ( ) . unwrap_or ( "" ) ;
190186 let filter_type = & f. query . filter_type ;
191187
192188 // if filter type is SQL, check if the user has access to the dataset based on the query string
@@ -197,7 +193,6 @@ impl Filters {
197193 }
198194 } else if * filter_type == FilterType :: Search || * filter_type == FilterType :: Filter {
199195 let dataset_name = & f. stream_name ;
200- let permissions = Users . get_permissions ( key) ;
201196 if user_auth_for_datasets ( & permissions, & [ dataset_name. to_string ( ) ] ) . is_ok ( ) {
202197 filters. push ( f. clone ( ) )
203198 }
You can’t perform that action at this time.
0 commit comments