Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix test suite check annotations #28

Open
tmpduarte opened this issue Nov 14, 2020 · 2 comments
Open

Fix test suite check annotations #28

tmpduarte opened this issue Nov 14, 2020 · 2 comments

Comments

@tmpduarte
Copy link

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

@frm
Copy link
Contributor

frm commented Nov 17, 2020

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

@naps62
Copy link
Member

naps62 commented Nov 18, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants