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

Missing require Permission #192

Closed
qortex opened this issue Aug 27, 2019 · 2 comments · Fixed by #196
Closed

Missing require Permission #192

qortex opened this issue Aug 27, 2019 · 2 comments · Fixed by #196
Labels
bug This points to a verified bug in the code
Milestone

Comments

@qortex
Copy link
Contributor

qortex commented Aug 27, 2019

When using #remove_role_permissions, I hit:

NameError: uninitialized constant Auth0::Mixins::Validation::Permission

It seems to me that's because this file misses:

require 'auth0/mixins/permission_struct'

If anyone runs through this until a patch: requiring permission_struct in your code before calling #remove_role_permissions does the trick.

@joshcanhelp
Copy link
Contributor

Sorry for the trouble there. That's an easy fix ... but I wonder why the specs didn't catch that. I'll leave this open to get a fix in place.

Thanks again!

@joshcanhelp joshcanhelp added the bug This points to a verified bug in the code label Aug 28, 2019
@joshcanhelp joshcanhelp added this to the v4.9.0 milestone Sep 25, 2019
@qortex
Copy link
Contributor Author

qortex commented Jan 27, 2020

Still got bitten by this bug, had to explicitly require 'auth0/mixins/permission_struct'.
Not sure why :(

It looks like it works without eager loading (but failed in prod because of eager loading). Maybe linked to Zeitwerk mode of Rails 6 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This points to a verified bug in the code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants