AlecStewart1#1125
AEAsh Elixir
•Created by AlecStewart1#1125 on 11/29/2023 in #support
Simple policy checks based with relationships
Oh whoops! Of course!
6 replies
AEAsh Elixir
•Created by AlecStewart1#1125 on 11/29/2023 in #support
Simple policy checks based with relationships
And of course...
A
Role
resource:
A Permission
resource:
6 replies
AEAsh Elixir
•Created by AlecStewart1#1125 on 11/29/2023 in #support
Simple policy checks based with relationships
A
RolePermission
resource:
A UserPermission
resource:
6 replies
AEAsh Elixir
•Created by AlecStewart1#1125 on 11/29/2023 in #support
Simple policy checks based with relationships
To give some more clarity, here's some other resources:
6 replies
AEAsh Elixir
•Created by AlecStewart1#1125 on 6/6/2023 in #support
Aggregates with resource relationships
Oh shoot. I forgot about the Oban library. That could fit our use cases pretty well if we don't feel like having cron jobs that run
mix
.25 replies
AEAsh Elixir
•Created by AlecStewart1#1125 on 6/6/2023 in #support
Aggregates with resource relationships
Also I guess there's always the solution of creating materialized views with SQL in the migrations.
25 replies
AEAsh Elixir
•Created by AlecStewart1#1125 on 6/6/2023 in #support
Aggregates with resource relationships
Well looks like I found what I might need. https://ash-hq.org/docs/dsl/ash-resource#postgres-custom_indexes
25 replies
AEAsh Elixir
•Created by AlecStewart1#1125 on 6/6/2023 in #support
Aggregates with resource relationships
Oh okay. Well it says that
field
is required but it defaults to the primary ID so I was confused as to whether or not it's actually required.25 replies
AEAsh Elixir
•Created by AlecStewart1#1125 on 6/6/2023 in #support
Aggregates with resource relationships
I guess that's more of a question about Postgres than Ash...
25 replies
AEAsh Elixir
•Created by AlecStewart1#1125 on 6/6/2023 in #support
Aggregates with resource relationships
Well I'll try that and see if works. How exactly do aggregates get created and stored? So a state could have like 20000 cities, so if I call for that aggregate somewhere with Ash am I going to have to wait for that aggregate to be initialized the first time?
25 replies
AEAsh Elixir
•Created by AlecStewart1#1125 on 6/6/2023 in #support
Aggregates with resource relationships
Do I need to just have
list :cities_in_state, :cities, :id
?25 replies
AEAsh Elixir
•Created by AlecStewart1#1125 on 6/6/2023 in #support
Aggregates with resource relationships
The field to aggregate. Defaults to the first field in the primary key of the resource
25 replies
AEAsh Elixir
•Created by AlecStewart1#1125 on 6/6/2023 in #support
Aggregates with resource relationships
So for list, if the default field is the primary ID
25 replies
AEAsh Elixir
•Created by AlecStewart1#1125 on 6/6/2023 in #support
Aggregates with resource relationships
That would also include fields for actual relationships between resources.
25 replies
AEAsh Elixir
•Created by AlecStewart1#1125 on 6/6/2023 in #support
Aggregates with resource relationships
The relationship or relationship path to use for the aggregate
25 replies
AEAsh Elixir
•Created by AlecStewart1#1125 on 6/6/2023 in #support
Aggregates with resource relationships
Okay, I didn't quite know if when it said
25 replies
AEAsh Elixir
•Created by AlecStewart1#1125 on 2/27/2023 in #support
Ash Way of Doing Password Hashing and Storage for Phoenix.
Oh okay, I looked at the
ash_hq
project and it's making more sense to me now.22 replies
AEAsh Elixir
•Created by AlecStewart1#1125 on 2/27/2023 in #support
Ash Way of Doing Password Hashing and Storage for Phoenix.
Oh okay, as an example, it's abstracting some of the CRUD actions you'd have to do for creating/updating a user password, right? Because I have the
create :signup
but I'd also need an update
action for resetting the password etc.22 replies
AEAsh Elixir
•Created by AlecStewart1#1125 on 2/27/2023 in #support
Ash Way of Doing Password Hashing and Storage for Phoenix.
Mostly just flexibility?
22 replies
AEAsh Elixir
•Created by AlecStewart1#1125 on 2/27/2023 in #support
Ash Way of Doing Password Hashing and Storage for Phoenix.
Ah okay, I think I'm following. What are the advantages to using the ash_authentication as opposed to doing it yourself?
22 replies