mirror of
https://github.com/openobserve/openobserve.git
synced 2026-11-04 16:09:05 +00:00
fix(overview): adapt the stream listing and tests to the new internal flag after rebasing
This commit is contained in:
@@ -855,6 +855,7 @@ mod tests {
|
||||
total_fields: 0,
|
||||
pattern_associations: vec![],
|
||||
is_derived: None,
|
||||
is_internal: false,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -156,21 +156,6 @@ pub async fn try_get_streams(
|
||||
Ok(indices_res)
|
||||
}
|
||||
|
||||
/// Checks a stream against the caller's permitted object list, using the stream's own type.
|
||||
fn is_stream_permitted(
|
||||
permitted: &[String],
|
||||
org_id: &str,
|
||||
stream_type: StreamType,
|
||||
stream_name: &str,
|
||||
) -> bool {
|
||||
let s_type = match stream_type {
|
||||
StreamType::EnrichmentTables => "enrichment_table",
|
||||
_ => stream_type.as_str(),
|
||||
};
|
||||
permitted.contains(&format!("{s_type}:_all_{org_id}"))
|
||||
|| permitted.contains(&format!("{s_type}:{stream_name}"))
|
||||
}
|
||||
|
||||
// org_id is only for pattern associations, which is ent only
|
||||
pub fn stream_res(
|
||||
org_id: &str,
|
||||
|
||||
Reference in New Issue
Block a user