Skip to content

Federation: Controlling when backlinks are created

Currently if LDPSerializer receives a distant resource as part of a POST or PATCH request:

CircleMember
    User: https://distant.com/users/1/

i.e. I added a distant user to my circle client-side the serializer attempts to get a reference to this urlid, and if it can't, it creates a backlink to it

  • Are there situations where I want to prevent this behaviour on a specific model?
  • Are there situations where I want to prevent this behaviour on a specific field? e.g. I don't want users to be able to add a distant user to a circle unless they are an admin

Model-level this could be provided by adding a custom permission, add_backlinked_relation on Models (#197 (closed) )