修复权限管理页面错误
1. 修复 ApiPermissions.vue 中的数据绑定错误 - 从 axios 响应中正确提取 .data 属性 - 修复 loadPermissionData、loadMonitoringData、save 函数 2. 禁用 FastAPI 响应验证 - 在 api_permissions.py 中添加 response_model=None - 避免 Pydantic 验证错误 3. 注册权限监控 API 路由 - 在 router.py 中导入并注册 permission_monitoring 模块 - 修改 permission_monitoring.py 的路由前缀 Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -52,12 +52,13 @@ async def list_api_endpoints(
|
||||
"",
|
||||
summary="获取项目的接口级权限矩阵",
|
||||
description="返回项目中各角色对API端点的权限配置",
|
||||
response_model=None,
|
||||
)
|
||||
async def get_study_api_permissions(
|
||||
study_id: uuid.UUID,
|
||||
_=Depends(require_study_roles(["PM"])),
|
||||
db: Annotated[AsyncSession, Depends(get_db_session)] = None,
|
||||
) -> dict[str, dict[str, dict[str, bool]]]:
|
||||
):
|
||||
"""获取项目的接口级权限矩阵
|
||||
|
||||
返回格式:
|
||||
@@ -90,13 +91,14 @@ async def get_study_api_permissions(
|
||||
summary="更新项目的接口级权限矩阵",
|
||||
description="批量更新项目中各角色对API端点的权限配置",
|
||||
status_code=status.HTTP_200_OK,
|
||||
response_model=None,
|
||||
)
|
||||
async def update_study_api_permissions(
|
||||
study_id: uuid.UUID,
|
||||
payload: dict[str, dict[str, bool]],
|
||||
_=Depends(require_study_roles(["PM"])),
|
||||
db: Annotated[AsyncSession, Depends(get_db_session)] = None,
|
||||
) -> dict[str, dict[str, dict[str, bool]]]:
|
||||
):
|
||||
"""更新项目的接口级权限矩阵
|
||||
|
||||
请求体格式:
|
||||
|
||||
Reference in New Issue
Block a user