Skip to content

Fix private skill space visibility - #1117

Open
FirstayZheng wants to merge 2 commits into
volcengine:mainfrom
FirstayZheng:fix/skill-private-visibility
Open

FirstayZheng wants to merge 2 commits into
volcengine:mainfrom
FirstayZheng:fix/skill-private-visibility

Conversation

@FirstayZheng

Copy link
Copy Markdown
Contributor

背景

资源库中的 Skill Space 列表此前只依赖云端 TagFilters(author=...) 做隔离。实测云端可能忽略该过滤条件,并且历史 Skill Space 也可能缺少 author tag,导致普通用户能看到其他账号创建的个人 Skill Space。

修改内容

  • 在 BFF 本地按可信身份和 Skill Space author tag 做最终可见性过滤,不再把云端 TagFilters 当作权限边界。
  • 普通用户只能看到 author 等于自己的个人 Skill Space;缺少 author 的历史个人空间、审核空间、共享空间不会进入个人空间列表。
  • Skill 列表/详情/文件/版本读取改为基于 Skill Space 读权限,不再按 Skill author 做错误隔离。
  • 审核通过发布到共享空间时,为共享副本补充 veadk:visibility=shared,保证公开技能通过企业共享空间暴露。
  • 补充云端忽略 TagFilters、历史缺 author、跨页扫描、共享副本 visibility tag 等回归测试。

测试

  • uv run pre-commit run --files frontend/server/skills/consts.py frontend/server/skills/repository.py frontend/server/skills/reviews.py frontend/server/skills/service.py frontend/server/skills/versions.py tests/frontend/server/skills/test_reviews.py tests/frontend/server/skills/test_shared_space.py tests/frontend/server/skills/test_versions.py veadk/cli/cli_frontend.py
  • uv run pytest tests/frontend/server/skills -q
  • git diff --check

本地结果:195 passed,pre-commit 通过,diff check 通过。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant