Skip to content

chore(authz): adopt typed Warden relation contract from providers#47

Open
hobbescodes wants to merge 1 commit into
masterfrom
chore/typed-authz-relations
Open

chore(authz): adopt typed Warden relation contract from providers#47
hobbescodes wants to merge 1 commit into
masterfrom
chore/typed-authz-relations

Conversation

@hobbescodes

@hobbescodes hobbescodes commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Description

Task link: N/A

Adopt the typed Warden relation contract from @omnidotdev/providers. The lib/authz checkPermission wrapper is now generic over the resource type, so permission is constrained to the relations Warden defines for that type. All existing call sites already use valid relations, so this adds type safety with no behavior change.

Important

Depends on omnidotdev/providers#6. The @omnidotdev/providers pin points at the feature-branch commit 1d1c21d; re-pin it to the merge commit once omnidotdev/providers#6 merges, before merging this.

Test Steps

  1. bunx tsc --noEmit clean, bunx biome check clean, bunx knip clean.

Make the lib/authz checkPermission wrapper generic over the resource type so
permission is constrained to the relations Warden defines for it, matching the
new @omnidotdev/providers signature. All existing call sites already use valid
relations, so this adds type safety with no behavior change. Bumps providers to
the build that ships the contract.
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