diff --git a/README.md b/README.md index 6ba44b2..c4cd3f6 100644 --- a/README.md +++ b/README.md @@ -56,13 +56,13 @@ iex> MyApp.Repo.all(MyApp.Blog.Article) # The `accessible_by!/3` function also has a `accessible_by/3` variant which returns `{:ok, ...}` tuples. -iex> MyApp.Permissions.accessible_by!(%MyApp.Users.User{id: 1}, :update, MyApp.Blog.Article) +iex> MyApp.Authorization.accessible_by!(%MyApp.Users.User{id: 1}, :update, MyApp.Blog.Article) [%MyApp.Blog.Article{id: 1, ...}, %MyApp.Blog.Article{id: 2, ...}] -iex> MyApp.Permissions.accessible_by!(%MyApp.Users.User{id: 1}, :read, MyApp.Blog.Article) +iex> MyApp.Authorization.accessible_by!(%MyApp.Users.User{id: 1}, :read, MyApp.Blog.Article) [%MyApp.Blog.Article{id: 1, ...}, %MyApp.Blog.Article{id: 2, ...}, %MyApp.Blog.Article{id: 3, ...}] -iex> MyApp.Permissions.accessible_by!(%MyApp.Users.User{id: 3, role: :admin}, :update, MyApp.Blog.Article) +iex> MyApp.Authorization.accessible_by!(%MyApp.Users.User{id: 3, role: :admin}, :update, MyApp.Blog.Article) [%MyApp.Blog.Article{id: 1, ...}, %MyApp.Blog.Article{id: 2, ...}, %MyApp.Blog.Article{id: 3, ...}] ``` diff --git a/lib/permit_ecto.ex b/lib/permit_ecto.ex index 943ad61..ca60381 100644 --- a/lib/permit_ecto.ex +++ b/lib/permit_ecto.ex @@ -44,13 +44,13 @@ defmodule Permit.Ecto do # The `accessible_by!/3` function also has a `accessible_by/3` variant which returns `{:ok, ...}` tuples. - iex> MyApp.Permissions.accessible_by!(%MyApp.Users.User{id: 1}, :update, MyApp.Blog.Article) + iex> MyApp.Authorization.accessible_by!(%MyApp.Users.User{id: 1}, :update, MyApp.Blog.Article) [%MyApp.Blog.Article{id: 1, ...}, %MyApp.Blog.Article{id: 2, ...}] - iex> MyApp.Permissions.accessible_by!(%MyApp.Users.User{id: 1}, :read, MyApp.Blog.Article) + iex> MyApp.Authorization.accessible_by!(%MyApp.Users.User{id: 1}, :read, MyApp.Blog.Article) [%MyApp.Blog.Article{id: 1, ...}, %MyApp.Blog.Article{id: 2, ...}, %MyApp.Blog.Article{id: 3, ...}] - iex> MyApp.Permissions.accessible_by!(%MyApp.Users.User{id: 3, role: :admin}, :update, MyApp.Blog.Article) + iex> MyApp.Authorization.accessible_by!(%MyApp.Users.User{id: 3, role: :admin}, :update, MyApp.Blog.Article) [%MyApp.Blog.Article{id: 1, ...}, %MyApp.Blog.Article{id: 2, ...}, %MyApp.Blog.Article{id: 3, ...}] ``` """