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
Sorry for the long delay on answering you, @jasonjho. I hope to bring something still useful for you.
I went through the gem's code/documentation and saw that it works by defining a default processor as you pointed. Since JU overrides the #process_request method only for avoiding bugs with duplicate request parsing on JR's default-generated actions, the jsonapi-authorization would work as expected only for those default actions.
Having in mind that JU works by explicitly defining/overriding the controller actions (i.e. the usual Rails way) I would suggest you to use the JU combined directly with Pundit, since it's simple to implement and it's also less "magical" for not involving the resource layer.
FYK I have a production API running with this authorization setup that I have just mentioned and the implementation got pretty neat, so maybe a new abstraction layer (i.e. jsonapi-authorization) is not required :-)
@tiagopog Is there a way to use
jsonapi-authorization
, which plugs into JR as a custom operation processor? Based on the JR controller logic here (https://github.com/cerebris/jsonapi-resources/blob/v0.9.0/lib/jsonapi/acts_as_resource_controller.rb#L77), there seems to be some logic around how these processors are invoked -- butjsonapi-utils
seems to be overriding this functionality, if I understand it correctly.Do you have any recommendations for how best to integrate with something like
jsonapi-authorization
? Would love to take your ideas and make them work.Thanks!
The text was updated successfully, but these errors were encountered: