Skip to content

fix: pass opts to for_action for generic actions#396

Merged
zachdaniel merged 1 commit intomainfrom
fix/generic-action-actor-for-action
Jan 21, 2026
Merged

fix: pass opts to for_action for generic actions#396
zachdaniel merged 1 commit intomainfrom
fix/generic-action-actor-for-action

Conversation

@barnabasJ
Copy link
Copy Markdown
Contributor

Generic actions on domains with require_actor? true fail with this error even when an actor is properly provided in the GraphQL context:

** (Ash.Error.Forbidden)
Forbidden Error

* The domain AshGraphql.Test.RequireActorDomain requires that an actor is provided at all times and none was provided.

The root cause is that opts (containing actor, tenant, etc.) were not passed to Ash.ActionInput.for_action/4 in the resolver.

Contributor checklist

Leave anything that you believe does not apply unchecked.

  • I accept the AI Policy, or AI was not used in the creation of this PR.
  • Bug fixes include regression tests
  • Chores
  • Documentation changes
  • Features include unit/acceptance tests
  • Refactoring
  • Update dependencies

Generic actions on domains with require_actor? true would fail with
DomainRequiresActor even when an actor was properly provided in the
GraphQL context. The issue was that opts (containing actor, tenant,
etc.) were not passed to Ash.ActionInput.for_action/4.
@zachdaniel zachdaniel merged commit d10d9aa into main Jan 21, 2026
21 of 22 checks passed
@zachdaniel
Copy link
Copy Markdown
Contributor

🚀 Thank you for your contribution! 🚀

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.

2 participants