统一项目角色与接口权限配置

This commit is contained in:
Cheng Zhou
2026-05-28 10:48:33 +08:00
parent 6d1c98bcae
commit 2c85742040
45 changed files with 2863 additions and 1329 deletions
+2 -2
View File
@@ -157,7 +157,7 @@ async def test_list_templates_filter_by_type(db_session, user_id):
@pytest.mark.asyncio
async def test_list_templates_excludes_qa_system_preset(db_session):
async def test_list_templates_includes_qa_system_preset(db_session):
qa_template = PermissionTemplate(
name="质量保证",
template_type=TemplateType.ROLE,
@@ -178,7 +178,7 @@ async def test_list_templates_excludes_qa_system_preset(db_session):
role_templates = await PermissionTemplateService.list_templates(db_session, template_type=TemplateType.ROLE)
assert "PM" in {template.category for template in role_templates}
assert "QA" not in {template.category for template in role_templates if template.is_system}
assert "QA" in {template.category for template in role_templates if template.is_system}
# ---------------------------------------------------------------------------