refactor: 修改 API 文档权限为仅允许认证用户访问

- 将 API 文档的权限设置从 AllowAny 更改为 IsAuthenticated- 确保只有经过身份验证的用户才能访问 API 文档
This commit is contained in:
1638245306
2025-04-29 14:45:45 +08:00
parent 66c28bd389
commit bda002398c

View File

@@ -50,7 +50,7 @@ schema_view = get_schema_view(
license=openapi.License(name="BSD License"),
),
public=True,
permission_classes=(permissions.AllowAny,),
permission_classes=(permissions.IsAuthenticated,),
generator_class=CustomOpenAPISchemaGenerator,
)
# 前端页面映射