Commit Graph

10 Commits

Author SHA1 Message Date
hiderfong 34466a1ae9 fix: optimize compliance scan performance and improve error handling
- Refactor scan_compliance to eliminate N+1 queries using joinedload and batch loading
- Add try-except wrapper in compliance scan API endpoint
- Improve frontend axios error interceptor to display detail/message/timeout errors
- Update CORS config and nginx for domain deployment
2026-04-25 21:27:22 +08:00
hiderfong ddb8cb8471 security: 修改admin密码并移除前端默认账户显示
- 将admin默认密码从admin123修改为Zhidi@n2023
- 更新数据库中admin用户密码哈希
- 更新后端配置、环境变量模板及测试脚本中的密码
- 移除登录页默认管理员账户密码提示文字
- 清空登录表单密码默认值,避免泄露
- 重新构建前端dist产物
2026-04-25 09:05:08 +08:00
hiderfong 6d70520e79 feat: 全量功能模块开发与集成测试修复
- 新增后端模块:Alert、APIAsset、Compliance、Lineage、Masking、Risk、SchemaChange、Unstructured、Watermark
- 新增前端模块页面与API接口
- 新增Alembic迁移脚本(002-014)覆盖全量业务表
- 新增测试数据生成脚本与集成测试脚本
- 修复metadata模型JSON类型导入缺失导致启动失败的问题
- 修复前端Alert/APIAsset页面request模块路径错误
- 更新docker-compose与开发计划文档
2026-04-25 08:51:38 +08:00
hiderfong 8b2bc84399 feat: implement full RBAC role-based access control
Backend:
- deps.py: add require_admin, require_manager, require_labeler, require_guest_or_above
- user.py: all write endpoints require admin
- datasource.py: write/sync endpoints require admin
- metadata.py: sync endpoint requires admin
- classification.py: category/rule write requires admin; results query requires guest+ with data isolation
- project.py: GET requires manager with created_by filtering; DELETE checks ownership
- task.py: my-tasks requires labeler with assignee_id filtering; create-task requires manager
- dashboard.py: requires guest_or_above
- report.py: requires guest_or_above
- project_service: list_projects adds created_by filter; list_results adds project_ids filter

Frontend:
- stores/user.ts: add hasRole, hasAnyRole, isAdmin, isManager, isLabeler, isSuperadmin
- router/index.ts: add roles to route meta; beforeEach checks role permissions
- Layout.vue: filter menu routes by user roles
- System.vue: hide add/edit/delete buttons for non-admins
- DataSource.vue: hide add/edit/delete/sync buttons for non-admins
- Project.vue: hide add/delete buttons for non-admins
2026-04-23 12:09:32 +08:00
hiderfong 377e9cba22 feat: user management - add/edit/delete users
Backend:
- Add GET /users/roles endpoint (list all roles)
- Add GET /users/depts endpoint (list all departments)

Frontend:
- Add user.ts API client (getUsers, createUser, updateUser, deleteUser, getRoles, getDepts)
- Rewrite System.vue with full user CRUD:
  - User list table with pagination
  - Add User button + dialog form
  - Edit user (username disabled, password hidden)
  - Delete user (disabled for superadmin)
  - Role and department dropdowns
  - Status radio buttons
2026-04-23 11:32:45 +08:00
hiderfong 9d38180745 rebrand: PropDataGuard → DataPointer
- App name: PropDataGuard → DataPointer
- Frontend title: 财险数据分级分类平台 → 数据分类分级管理平台
- LocalStorage keys: pdg_token/pdg_refresh → dp_token/dp_refresh
- Package name: prop-data-guard-frontend → data-pointer-frontend
- Project config: admin@propdataguard.comadmin@datapo.com
- Celery app name: prop_data_guard → data_pointer
- Layout logo, login title, page title all updated
2026-04-23 11:26:28 +08:00
hiderfong 3b50ccc7e1 feat: dashboard & report APIs with real DB stats
Backend:
- Add /dashboard/stats API (data_sources, tables, columns, labeled, sensitive, projects)
- Add /dashboard/distribution API (level/cat/source distribution, project progress, heatmap)
- Add /reports/stats API (total/auto/manual/reviewed counts + level distribution)
- Fix report download: add template relationship to ClassificationProject
- All stats computed from real DB queries

Frontend:
- Dashboard.vue: replace all hardcoded data with API-driven computed charts
- Report.vue: replace all hardcoded data with API-driven charts
- Add dashboard.ts and report.ts API clients
2026-04-23 11:10:16 +08:00
hiderfong 5119ca775b fix: classification results empty and res.data access issues
Backend:
- Add GET /classifications/results endpoint with project/level/keyword filters
- Add column relationship to ClassificationResult model
- Fix test data generator to fetch column IDs from DB after bulk insert

Frontend:
- Fix request.ts interceptor to return full response body (keep total/pagination)
- Fix all pages to use res.data instead of res
- Add getClassificationResults API in classification.ts
- Implement fetchData in Classification.vue with proper filtering and pagination
- Fix same res.data issue in Category.vue, Metadata.vue, Project.vue, DataSource.vue, Dashboard.vue, Task.vue
2026-04-23 10:46:51 +08:00
hiderfong fb4aaad9fc feat: Phase 3-5 - workflow, labeling, reports, dashboard enhancement, tests 2026-04-22 17:22:11 +08:00
hiderfong 1773bda06b feat: initial commit - Phase 1 & 2 core features 2026-04-22 17:07:33 +08:00