File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -245,7 +245,8 @@ impl PrismDatasetRequest {
245245        mut  self , 
246246        key :  SessionKey , 
247247    )  -> Result < Vec < PrismDatasetResponse > ,  PrismLogstreamError >  { 
248-         if  self . streams . is_empty ( )  { 
248+         let  is_empty = self . streams . is_empty ( ) ; 
249+         if  is_empty { 
249250            self . streams  = PARSEABLE . streams . list ( ) ; 
250251        } 
251252
@@ -254,7 +255,10 @@ impl PrismDatasetRequest {
254255            if  Users . authorize ( key. clone ( ) ,  Action :: ListStream ,  Some ( stream) ,  None ) 
255256                != crate :: rbac:: Response :: Authorized 
256257            { 
257-                 warn ! ( "Unauthorized access requested for stream: {stream}" ) ; 
258+                 // Don't warn if listed from Parseable 
259+                 if  !is_empty { 
260+                     warn ! ( "Unauthorized access requested for stream: {stream}" ) ; 
261+                 } 
258262                continue ; 
259263            } 
260264
@@ -293,10 +297,7 @@ impl PrismDatasetRequest {
293297            // Retrieve distinct values for source identifiers 
294298            // Returns None if fields aren't present or if query fails 
295299            let  ips = self . get_distinct_entries ( stream,  "p_src_ip" ) . await . ok ( ) ; 
296-             let  user_agents = self 
297-                 . get_distinct_entries ( stream,  "p_user_agent" ) 
298-                 . await 
299-                 . ok ( ) ; 
300+             let  user_agents = self . get_distinct_entries ( stream,  "p_user_agent" ) . await . ok ( ) ; 
300301
301302            responses. push ( PrismDatasetResponse  { 
302303                info, 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments