# Code interface for resource owned by User

**URL:** <https://forum.elixirforum.com/t/code-interface-for-resource-owned-by-user/58982>\
**Category:** Questions\
**Tags:** ash, ash-authentication, ash-code-interface\
**Created:** [October 15, 2023, 12:01am UTC](https://forum.elixirforum.com/t/code-interface-for-resource-owned-by-user/58982 "2023-10-15T00:01:06Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![zachdaniel](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/zachdaniel/32/31980_2.png) [@zachdaniel](https://forum.elixirforum.com/u/zachdaniel)\
**Post date:** [October 17, 2023, 2:45pm UTC](https://forum.elixirforum.com/t/code-interface-for-resource-owned-by-user/58982/8 "2023-10-17T14:45:52Z")

</div>

Ah, you likely want this to be only in a specific action, i.e

```elixir
create :create do
  change relate_actor(:user)
end

```

If it is in global changes, it will happen on all create _and_ update actions.

---

_[View the full topic](https://forum.elixirforum.com/t/code-interface-for-resource-owned-by-user/58982)._
