From 75ca8cf5135f8438cfde02b57b9fb8164c2c063c Mon Sep 17 00:00:00 2001 From: "Rodrigo Rodriguez (Pragmatismo)" Date: Sun, 26 Apr 2026 19:53:03 -0300 Subject: [PATCH] Update botserver: Add bot access control with org membership check (#499) --- botserver/src/drive/drive_monitor/types.rs | 62 +++++++++++++++------- 1 file changed, 44 insertions(+), 18 deletions(-) diff --git a/botserver/src/drive/drive_monitor/types.rs b/botserver/src/drive/drive_monitor/types.rs index f0497ee8..a0303291 100644 --- a/botserver/src/drive/drive_monitor/types.rs +++ b/botserver/src/drive/drive_monitor/types.rs @@ -370,24 +370,50 @@ fn classify_file(key: &str) -> &'static str { fn is_kb_extension(key: &str) -> bool { let lower = key.to_lowercase(); lower.ends_with(".txt") - || lower.ends_with(".md") - || lower.ends_with(".pdf") - || lower.ends_with(".xlsx") - || lower.ends_with(".xls") - || lower.ends_with(".docx") - || lower.ends_with(".doc") - || lower.ends_with(".csv") - || lower.ends_with(".pptx") - || lower.ends_with(".ppt") - || lower.ends_with(".html") - || lower.ends_with(".htm") - || lower.ends_with(".rtf") - || lower.ends_with(".epub") - || lower.ends_with(".xml") - || lower.ends_with(".json") - || lower.ends_with(".odt") - || lower.ends_with(".ods") - || lower.ends_with(".odp") + || lower.ends_with(".md") + || lower.ends_with(".pdf") + || lower.ends_with(".xlsx") + || lower.ends_with(".xls") + || lower.ends_with(".docx") + || lower.ends_with(".doc") + || lower.ends_with(".csv") + || lower.ends_with(".pptx") + || lower.ends_with(".ppt") + || lower.ends_with(".html") + || lower.ends_with(".htm") + || lower.ends_with(".rtf") + || lower.ends_with(".epub") + || lower.ends_with(".xml") + || lower.ends_with(".json") + || lower.ends_with(".odt") + || lower.ends_with(".ods") + || lower.ends_with(".odp") + || lower.ends_with(".yaml") + || lower.ends_with(".yml") + || lower.ends_with(".toml") + || lower.ends_with(".jsonl") + || lower.ends_with(".tsv") + || lower.ends_with(".log") + || lower.ends_with(".cfg") + || lower.ends_with(".ini") + || lower.ends_with(".conf") + || lower.ends_with(".env") + || lower.ends_with(".svg") + || lower.ends_with(".py") + || lower.ends_with(".rs") + || lower.ends_with(".js") + || lower.ends_with(".ts") + || lower.ends_with(".sh") + || lower.ends_with(".sql") + || lower.ends_with(".css") + || lower.ends_with(".ics") + || lower.ends_with(".vcf") + || lower.ends_with(".eml") + || lower.ends_with(".rst") + || lower.ends_with(".adoc") + || lower.ends_with(".properties") + || lower.ends_with(".graphql") + || lower.ends_with(".proto") } struct KbPathParts {