add owner check for team work (#2892)

### What problem does this PR solve?

#2834

### Type of change

- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
Kevin Hu
2024-10-18 13:48:57 +08:00
committed by GitHub
parent 8fdfa0f669
commit c760f058df
6 changed files with 117 additions and 13 deletions

View File

@ -45,6 +45,9 @@ class ExeSQLParam(ComponentParamBase):
self.check_positive_integer(self.port, "IP Port")
self.check_empty(self.password, "Database password")
self.check_positive_integer(self.top_n, "Number of records")
if self.database == "rag_flow":
if self.host == "ragflow-mysql": raise ValueError("The host is not accessible.")
if self.password == "infini_rag_flow": raise ValueError("The host is not accessible.")
class ExeSQL(ComponentBase, ABC):