Revert "fix(knowledge): articles共享层语义对齐评审方案——entity_id=0系统共享(替代NULL) (entity-memory-partition 复核对齐)"
This reverts commit 5e96d15888.
This commit is contained in:
@@ -139,7 +139,7 @@ class TestKnowledgeArticlesGlobalUnion:
|
||||
def test_articles_global_union_scope(self, client: TestClient, db: Session):
|
||||
"""文章查询 = 本企业专属 ∪ 全局共享;他企专属不可见"""
|
||||
_ensure_entity(db, 2)
|
||||
g = KnowledgeArticle(title="全局教学文章", content="c", category="term", entity_id=0)
|
||||
g = KnowledgeArticle(title="全局教学文章", content="c", category="term", entity_id=None)
|
||||
e1 = KnowledgeArticle(title="E1专属文章", content="c", category="term", entity_id=1)
|
||||
e2 = KnowledgeArticle(title="E2专属文章", content="c", category="term", entity_id=2)
|
||||
db.add_all([g, e1, e2])
|
||||
@@ -166,7 +166,7 @@ class TestKnowledgeArticlesGlobalUnion:
|
||||
def test_get_article_cross_entity_404(self, client: TestClient, db: Session):
|
||||
"""越权:entity1 直取 entity2 专属文章 → 404;全局文章两账套可取"""
|
||||
_ensure_entity(db, 2)
|
||||
g = KnowledgeArticle(title="全局文章", content="c", entity_id=0)
|
||||
g = KnowledgeArticle(title="全局文章", content="c", entity_id=None)
|
||||
e2 = KnowledgeArticle(title="E2秘密文章", content="c", entity_id=2)
|
||||
db.add_all([g, e2])
|
||||
db.commit()
|
||||
|
||||
Reference in New Issue
Block a user