Fix private skill space visibility - #1117
Open
FirstayZheng wants to merge 2 commits into
Open
FirstayZheng wants to merge 2 commits into
FirstayZheng wants to merge 2 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
资源库中的 Skill Space 列表此前只依赖云端
TagFilters(author=...)做隔离。实测云端可能忽略该过滤条件,并且历史 Skill Space 也可能缺少authortag,导致普通用户能看到其他账号创建的个人 Skill Space。修改内容
authortag 做最终可见性过滤,不再把云端TagFilters当作权限边界。author等于自己的个人 Skill Space;缺少author的历史个人空间、审核空间、共享空间不会进入个人空间列表。veadk:visibility=shared,保证公开技能通过企业共享空间暴露。测试
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.pyuv run pytest tests/frontend/server/skills -qgit diff --check本地结果:195 passed,pre-commit 通过,diff check 通过。