Skip to content

Commit c621514

Browse files
committed
feat(PermissionSessionContext): extract, export, and self-resolve from permissionKey
- Extract PermissionSessionContext from PermissionShield into a standalone exported component for reuse in card/full-page layouts (e.g. 403 error pages). - Add self-resolving mode via permissionKey prop — resolves displayedKeys, subtitle, categories, and subcategories internally using useUnmetPermissionKeys, getPermissionKeys, and getPermissionKeyCombinator. - Refactor PermissionShield to delegate key resolution to PermissionSessionContext instead of duplicating it, keeping tooltip and card rendering paths in sync. - Fix accessibility: copy-key control now has role=button, tabIndex=0, and keyboard handler (Enter/Space). - Fix boolean coercion: wrap chip-container length checks with Boolean() to prevent rendering literal '0'. - Export PermissionSessionContext and PermissionSessionContextProps from the root barrel file (src/index.tsx). Signed-off-by: Rishi Raj <[email protected]> Signed-off-by: Rishi Raj <[email protected]>
1 parent 310d02f commit c621514

2 files changed

Lines changed: 414 additions & 217 deletions

File tree

0 commit comments

Comments
 (0)