Raathmd

Raathmd

The step where previous_names are added is now preventing the save of an artist.
The artist table has the migrated field and the change function is in a separate module.
I see no messages in the terminal about why the save is not working.
How can i get some logging info from the submit action?
I added an inspect in the change function but nothing was output so i assume something is preventing it from executing this. I then added an input field for the previous_names field and started getting validation that it is required, even though allow_nil is true.

Any help appreciated.
Thanks

Showing Posts 11 to 20

zachdaniel

zachdaniel

Creator of Ash

And this error


will be in the next release of ash

Raathmd

Raathmd OP

Thanks for assisting me with this. I am new to Elixir and ash and will be using ash to build a multi tenant app that connects to an external api. Very impressed with ash so far.

ken-kost

ken-kost

Now I’m thinking: what about having mix ash.gen.change? :thinking:

zachdaniel

zachdaniel

Creator of Ash

I’m here for it :+1:

ken-kost

ken-kost

and it’s here for you :call_me_hand:

sodapopcan

sodapopcan

Apologies for the necro but I have some related nitpicky feedback and I specifically remembered this thread because the lack of @impl trues was causing me some dissonance as well. Perhaps you already caught this but since it’s not a change/validation/calculation I wanted to point it out: For the installed_extensions example in Speeding things up with custom database indexes, it would be helpful to include @impl true there as well.

Thanks, Rebecca and Zach!

sevenseacat

sevenseacat

Author of Ash Framework

I’ve just added @impl true to all the generated functions in the Repo module after installing AshPostgres - installed_extensions/0, min_pg_version/0, and prefer_transaction?/0. Good call and thanks for that!

ghannam80

ghannam80

Hello @sevenseacat , @zachdaniel ,

Can you please let me know if you have a best suggestion for implementing dual control and data filters in authorization?
In most enterprise applications you need maker/checker for sensitive actions/functions , also some users could be authorized to do an action like read/write on filtered set of data of the resource like certain branch or city ,..etc
Also if you can let me know what integrates well with Ash for record audit and maybe sensitive data view?

Thanks

zachdaniel

zachdaniel

Creator of Ash

For a maker/checker pattern that is something that I would likely use something like ash_state_machine (or just a :state attribute), with separate actions for making and checking, and separate policies on those two actions, allowing the maker to make and the checker to check etc. Could, for instance, just have a policy forbidding the maker from also being the checker etc.

For authorizing reads/writes on filtered sets of data, see policies. They are built for this purpose and will filter reads and writes appropriately.

For record audit, do you mean like audit logs/trails? If so we have ash_paper_trail as a core extension that will track changes to a resource over time.

For sensitive data view, I’m thinking you mean providing partial access to records etc., which can be implemented using field policies :slight_smile:

ghannam80

ghannam80

Thanks @zachdaniel ,

The audit refers to monitor some critical resources changes “usually configuration resources” so that we can go to some UI to identify old value/new value and who did the change right from the start.

The sensitive data refers to those encrypted fields or in payment domain something like clear card number could be viewed only by users who have the privileges to do so while others could see a hashed or encrypted value.

I took a look at ash_state_ma chine and it seems serving the logic for changing the resources values utilizing maker/checker but looking for a sample repository or project to check it further.
btw , when will have the last chapter of the book?

— All posts loaded —

Where Next? Top

Trending in Questions Top

RSP87
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
nseaSeb
Hello, I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
kpanic
Hi everyone, I am toying with the idea of building a “match maker” for giving personal help to people that wants to start coding. I sta...
New
brecabral
Documentation While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
velrest
So my question is quite simple and i have found no conclusive answer on forum, google or AI. Should we use :erlang.float for Integer to ...
New
asweet-confluent
I recently noticed that Elixir’s Logger defaults its primary log level to :debug when no :logger, :level application configuration is pre...
New
ryanwinchester
apply_graft/2 doesn’t rewrite an add_many sub-workflow’s deps on an add step. Grafted jobs cancel with “upstream job was deleted” Version...
New

Other Trending Topics Top

JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
mhanberg
Hi everyone! The first release candidate for the Expert language server project is now available! We’ve published a press release detai...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Dmk
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New

Latest on Elixir Forum

Elixir Forum

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews