Repository navigation
Commit 5f5511f
The published catalog page stated the `session.roles` retirement three times
and used the reserved word "role" as live vocabulary six more times. D3 makes
"role" reserved-forbidden (capability = permission_set, distribution =
position, hierarchy = business_unit); this page ships verbatim to third-party
projects via `npx skills add`, so every live use teaches an AI reader the
reserved word.
Kept: the one retirement note (the `ctx.session` table row) and the one useful
warning (never write `ctx.session?.roles?.includes`). Rewritten: the duplicate
retirement note in the `HookContext` comment folds into "privilege is judged by
the security service, never by a session claim"; the masking callout says
"for a permission set or position"; the masking comment spells the rest in D3
vocabulary. The cross-object example no longer queries a field named `role` --
`sys_user.role` does exist as a legacy better-auth admin scalar, but ADR-0068
D2 stopped synthesizing it and its only writer was retired, so an example
looking up "the admin" by it teaches authorization off a dead field; it now
resolves a related user by id, which is what a hook actually does.
Residue: 3 occurrences, all quoted history, which is what the follow-up
baseline entry covers.
Claude-Session: https://claude.ai/code/session_019RfFHiRCSs3JXLK4cwcfox
Co-authored-by: Claude <noreply@anthropic.com>
1 parent 41b5a44 commit 5f5511f
1 file changed
Lines changed: 14 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
571 | 571 | | |
572 | 572 | | |
573 | 573 | | |
574 | | - | |
575 | | - | |
| 574 | + | |
| 575 | + | |
576 | 576 | | |
577 | 577 | | |
578 | 578 | | |
| |||
729 | 729 | | |
730 | 730 | | |
731 | 731 | | |
732 | | - | |
733 | | - | |
| 732 | + | |
| 733 | + | |
734 | 734 | | |
735 | 735 | | |
736 | 736 | | |
| |||
819 | 819 | | |
820 | 820 | | |
821 | 821 | | |
822 | | - | |
823 | | - | |
824 | | - | |
825 | | - | |
826 | | - | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
827 | 827 | | |
828 | 828 | | |
829 | 829 | | |
| |||
834 | 834 | | |
835 | 835 | | |
836 | 836 | | |
837 | | - | |
838 | | - | |
839 | | - | |
840 | | - | |
841 | | - | |
842 | | - | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
843 | 842 | | |
844 | 843 | | |
845 | 844 | | |
| |||
0 commit comments