Skip to content

Hide hidden schemas - #34

Merged
nicklayb merged 4 commits into
mainfrom
hide_hidden_schemas
Aug 14, 2026
Merged

Hide hidden schemas#34
nicklayb merged 4 commits into
mainfrom
hide_hidden_schemas

Conversation

@nicklayb

Copy link
Copy Markdown
Owner

This PR hides fields relating to non allowed schemas in the Live View component.

Suppose you have a User that belongs to a Manager and have the following schemas

defmodule Definition do
  def schemas(%{role: "user"}), do: %{"User" => MyApp.User}
  def schemas(%{role: "admin"}), do: %{"User" => MyApp.User, "Manager" => MyApp.Manager}
end

Using assigns role: "user" shouldn't allow the UI to show the manager nor the manager_id keys on the User schema since they aren't allowed to use Manager schema.

@nicklayb
nicklayb merged commit f0dd648 into main Aug 14, 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