Fernando Mendes
Fernando Mendes
This is because the `TestPolicy` exists only for assertions. We can silence this by defining a basic `can?/3` that returns always true, I think /cc @naps62
Honestly, just not to confuse with calling the policy directly. Especially since the API will be different. I'd prefer `can?` but I can see some confusion arising.
Another question: how would we handle custom policies? When `plug`ging, we either infer the policy or have the user explicitly provide it. We can add an optional parameter in the...
> because people know have to remember a different name, for no clear reason Yeah, I agree, but it's mostly because the API would be different. Don't you think that...
I'm down with `can?/3`. I'm still against making the resource aware of policies, I think you're threading a dangerous line when it comes to responsibilities. Ah, you're saying when checking...
The fallback controller was just an example for the README. A custom unauthorized handler that would defer errors to the fallback controller, to keep all the error handling logic in...
Can you also add credo?
+1 on this, the configurable binding is huge plus
I'll get around to test this later, but can you include a comment linking the original function? 🙏
I'm actually on the fence on this. I tend to prefer less "magic" happening around. I prefer the approach of derived factories, like @maymillerricci mentioned. Given the nature of Elixir,...