diff --git a/lib/jsonapi/authorization/authorizing_processor.rb b/lib/jsonapi/authorization/authorizing_processor.rb index 7bedefb2..ab2418cc 100644 --- a/lib/jsonapi/authorization/authorizing_processor.rb +++ b/lib/jsonapi/authorization/authorizing_processor.rb @@ -16,6 +16,11 @@ class AuthorizingProcessor < JSONAPI::Processor set_callback :replace_to_many_relationship, :before, :authorize_replace_to_many_relationship set_callback :remove_to_many_relationship, :before, :authorize_remove_to_many_relationship set_callback :remove_to_one_relationship, :before, :authorize_remove_to_one_relationship + set_callback( + :replace_polymorphic_to_one_relationship, + :before, + :authorize_replace_polymorphic_to_one_relationship + ) [ :find, @@ -216,6 +221,10 @@ def authorize_remove_to_one_relationship authorizer.remove_to_one_relationship(source_record, relationship_type) end + def authorize_replace_polymorphic_to_one_relationship + raise NotImplementedError + end + private def authorizer