You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.
We don't see self.class.current_user being set to anything by default, and so I'm guessing the tests might set it but it isn't being defaulted in actual code.
I've worked around this by reopening the class and defining a current_user class method e.g. monkeypatching. note that I'm using rails and so can chain the namespace.
This is true in released gem and master, the reason seems to be around this line:
https://github.com/ontohub/graphql-pundit/blob/master/lib/graphql-pundit/authorization.rb#L58
We don't see
self.class.current_user
being set to anything by default, and so I'm guessing the tests might set it but it isn't being defaulted in actual code.I've worked around this by reopening the class and defining a
current_user
class method e.g. monkeypatching. note that I'm using rails and so can chain the namespace.The text was updated successfully, but these errors were encountered: