Spaces:
Paused
Paused
Update src/enhanced_rag_system.py
Browse files- src/enhanced_rag_system.py +18 -1
src/enhanced_rag_system.py
CHANGED
|
@@ -714,4 +714,21 @@ Please contact your administrator if you need access to additional information."
|
|
| 714 |
"vector_store": "✅ ChromaDB" if self.vector_store_initialized else "⚠️ Fallback",
|
| 715 |
"llm": f"✅ {self.llm_model}" if self.llm_initialized else "⚠️ Templates",
|
| 716 |
"fastapi": "✅ Simulated",
|
| 717 |
-
"authentication": "✅
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 714 |
"vector_store": "✅ ChromaDB" if self.vector_store_initialized else "⚠️ Fallback",
|
| 715 |
"llm": f"✅ {self.llm_model}" if self.llm_initialized else "⚠️ Templates",
|
| 716 |
"fastapi": "✅ Simulated",
|
| 717 |
+
"authentication": "✅ JWT-style RBAC"
|
| 718 |
+
}
|
| 719 |
+
}
|
| 720 |
+
|
| 721 |
+
def get_available_documents_for_role(self, role: str) -> List[Dict]:
|
| 722 |
+
"""Get list of documents available for a specific role"""
|
| 723 |
+
accessible_docs = self.auth_system.get_accessible_documents(role)
|
| 724 |
+
doc_info = self.document_processor.get_document_info()
|
| 725 |
+
|
| 726 |
+
available = []
|
| 727 |
+
for doc_name in accessible_docs:
|
| 728 |
+
if doc_name in doc_info:
|
| 729 |
+
available.append({
|
| 730 |
+
"content_type": doc_name,
|
| 731 |
+
**doc_info[doc_name]
|
| 732 |
+
})
|
| 733 |
+
|
| 734 |
+
return available
|