coyote-team / coyote-wp

Wordpress Plug-in for Coyote
2 stars 2 forks source link

How to handle existing linked resources when organization changes #19

Closed jkva closed 3 years ago

jkva commented 4 years ago

Currently images that have a linked coyote resource id (via data-coyote-id attribute) are skipped when processing post updates.

When a user changes their API token, endpoint or organization ID, these resource IDs potentially no longer match or are no longer available. This could be a problem when a coyote-side update callback fires.

Should linked coyote resource ids be stripped when no longer applicable?

sinabahram commented 4 years ago

I think the answer has to be yes. if you change your authentication, then it has to go rebuild. So, this needs a huge “Are you sure you want to do this” kind of warning, but yes, I agree they should be stripped, because they have to be.

jkva commented 4 years ago

Formalised in #23.

jkva commented 3 years ago

This has since been implemented; organization changes require a re-import of resources. The user is presented with a warning when switching organizations.