dictator icon indicating copy to clipboard operation
dictator copied to clipboard

Fix test suite check annotations

Open tmpduarte opened this issue 5 years ago • 2 comments

The test suite is showing a warning that are then shown in the pull requests: Screenshot 2020-11-14 at 17 05 47

tmpduarte avatar Nov 14 '20 17:11 tmpduarte

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

frm avatar Nov 17 '20 15:11 frm

Yes. That sounds like a good idea

Either that, or define the opposite on the policy itself. e.g.: a __before_compile__ call that would define def can?(_, _, _), do: false, meaning that any policy where the user forgets to explicitly define permissions, would falback to disallowing everything, which I believe is safer than the opposite

naps62 avatar Nov 18 '20 15:11 naps62