Added users page and user viewing
This commit is contained in:
@@ -4,7 +4,7 @@ defmodule Mixer.Accounts.User do
|
||||
domain: Mixer.Accounts,
|
||||
data_layer: AshPostgres.DataLayer,
|
||||
authorizers: [Ash.Policy.Authorizer],
|
||||
extensions: [AshAuthentication]
|
||||
extensions: [AshAuthentication, AshTypescript.Resource]
|
||||
|
||||
authentication do
|
||||
add_ons do
|
||||
@@ -66,6 +66,10 @@ defmodule Mixer.Accounts.User do
|
||||
repo Mixer.Repo
|
||||
end
|
||||
|
||||
typescript do
|
||||
type_name "users"
|
||||
end
|
||||
|
||||
actions do
|
||||
defaults [:read]
|
||||
|
||||
@@ -282,6 +286,10 @@ defmodule Mixer.Accounts.User do
|
||||
bypass AshAuthentication.Checks.AshAuthenticationInteraction do
|
||||
authorize_if always()
|
||||
end
|
||||
|
||||
policy action_type(:read) do
|
||||
authorize_if always()
|
||||
end
|
||||
end
|
||||
|
||||
attributes do
|
||||
|
||||
Reference in New Issue
Block a user