Register replace_polymorphic_to_one_relationship callback#53
Register replace_polymorphic_to_one_relationship callback#53plantfansam wants to merge 1 commit intovenuu:masterfrom plantfansam:polymorphic-authorization
Conversation
|
Would it be helpful for me to try to implement an authorization strategy here, rather than simply raising the |
That would be lovely! I'm not quite sure what kind of policy method we'll want to call and in what cases is the You might want to check out the last comment in #51 on how authorization on resource level could also work. The #51 should also give good context on how we've thought about the relationship authorizations. |
|
Excellent, thanks so much. I will give it a shot! |
This pull requests registers a callback on
JSONAPI::Processor#replace_polymorphic_to_one_relationship, which is defined as an eligible callback here: https://github.com/cerebris/jsonapi-resources/blame/master/lib/jsonapi/processor.rb#L13.I am not sure what the expected behavior ought to be, so I have simply filled in
raise NotImplementedErrorso that we can decide.This was originally part of #52 (comment: #52 (comment)). It is not necessary for tests to pass against jsonapi-resources 0.9.