Repository navigation
feat: G-23 stage 4 (per-type permission gate for custom properties) - #190
Merged
Merged
Conversation
BMJLearnToHelloWorld
added a commit
that referenced
this pull request
Nov 10, 2026
BMJLearnToHelloWorld
added a commit
that referenced
this pull request
Nov 10, 2026
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.
内容
G-23 阶段 4:自定义属性的按类型权限门(8 个文件 +696/−26)。
useEntityPermissions组合式函数(新建,+212):按复核 §5.1 只建一次,G-18 阶段 2 后面消费。pin 忠实:(resource, string | {id}, {deleted?, enabled?})、DEFAULT_ENTITY_PERMISSION(pin 的 20 键全 false 显式形状)、已有getDerivedPermissionFlags派生、store 支撑拉取、refresh()走新 store 失效。Vue 适配:identifier/options 为MaybeRefOrGetter(type id 在load()后才解析)、key 变化立即复位全 false、generation 计数丢弃过期在途响应。useEntityPermissions('type', {id}, {enabled}),不传deleted;Add 需editPermission && activeTab === 'custom-properties';无editPermission时行内 Edit/Delete 隐藏(非禁用);权限错误 → 错误提示、页面保持可读。'type'(ADMIN_ROUTE_RESOURCE),入口授权规则不变,未放宽其他任何路由。deleted: true不撤销Delete:已对 pin 的PermissionsUtils.ts核实(revokeEditPermissions只撤销 Edit*),测试中有记录。依据
复核
REVIEW-W3-G-STAGES.md(G-23 阶段 4:APPROVE + 10 条件,全部满足)。ADR:docs/decisions/2026-11-10-custom-properties-stage-4-per-type-gate.md,记录路由放宽理由、R3 关闭、组合式函数归属(G-23 建、G-18 用)、Vue 适配,以及残留 R-W3G23-S4-1(5 行线上验证矩阵待补,含拒绝用例)。测试