Closed sevenseacat closed 3 weeks ago
Fixed in 5f5cccc2ea916534d2e77e2ee8446c69bb2c34fb
The "facts" used by the authorizer were actually not loaded when building the error which would lead to many breakdowns being filled with ?
, so fixing this should also just make policy breakdowns correct in general again.
Describe the bug
It appears to be something in here somewhere https://github.com/ash-project/ash/blob/main/lib/ash/error/forbidden/policy.ex#L165-L197
I don't know how it determines whether or not a policy is relevant, but something isn't quite right. Even when policies are applied, it's printing out a message saying that no policies are applied.
To Reproduce
I don't have a failing test because I couldn't work out how to test that an error was raised without a specific message, but in
Ash.Test.Policy.SimpleTest
if you define a resource like:And a test like this:
The error in the test is:
Expected behavior
The error message shouldn't tell me that no policies are applied, because one policy was applied and it failed.
Runtime