Skip to content

docs: highlight grants DSL in README quick start#5

Merged
C-Sinclair merged 1 commit intomainfrom
docs/readme-grants-dsl
Apr 21, 2026
Merged

docs: highlight grants DSL in README quick start#5
C-Sinclair merged 1 commit intomainfrom
docs/readme-grants-dsl

Conversation

@C-Sinclair
Copy link
Copy Markdown

Summary

PR #3 merged the declarative `grants` DSL, but the README's Quick Start
still showcased the old imperative-resolver pattern. This PR updates the
docs to reflect what the library actually recommends now:

  • Feature list mentions the declarative `grants` DSL up front.
  • Quick Start code sample replaces the `resolver fn actor, _ -> case ... end`
    with an equivalent `grants do … end` block (admin/editor/viewer RBAC).
  • Keeps the function-form resolver documented as the mutually-exclusive
    escape hatch for runtime instance-specific permissions (DB-backed per-row
    sharing).

No code changes.

Test plan

  • Rendered README locally — markdown parses cleanly
  • Quick Start code sample is a working subset of the integration test
    `test/ash_grant/grants_integration_test.exs` (admin, editor, viewer
    grants + `:own`/`:published` scopes), so it compiles and the
    described behavior matches what the test suite verifies

PR #3 merged the declarative grants DSL but left the README showing the
old imperative-resolver pattern. This commit:

- Adds the grants DSL to the feature list at the top
- Replaces the Quick Start code sample to use a grants block (RBAC for
  admin/editor/viewer) instead of a case-statement resolver
- Documents the function-form resolver as the mutually-exclusive escape
  hatch for runtime instance-specific permissions

No code changes.
@C-Sinclair C-Sinclair merged commit 2d7b5f7 into main Apr 21, 2026
1 check passed
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