I am trying to set up a ContentService "Saving" event that limits certain users so that they can only save changes to certain cultures. In particular, I want to prevent these users from saving changes to the default language.
I have a "Saving" event set up that is seeing the saved IContent node, but I can't figure out a way to detect what cultures just had (still unsaved) changes applied that works properly.
There is a "EditedCultures" property on the IContent object, but on initial save of a published node, this will always be empty. It will show a value on the next save, so it seems like it's updated after the Saving event, making it useless for my purposes.
There is also the e.IsSavingCulture method, but it appears that the default culture is always saved even if no changes were applied to it, making it not work for my use case.
How would I go about detecting which cultures of a node had changes applied, inside a Saving event?
Problems with ContentService Saving and Cultures
I am trying to set up a ContentService "Saving" event that limits certain users so that they can only save changes to certain cultures. In particular, I want to prevent these users from saving changes to the default language.
I have a "Saving" event set up that is seeing the saved IContent node, but I can't figure out a way to detect what cultures just had (still unsaved) changes applied that works properly.
There is a "EditedCultures" property on the IContent object, but on initial save of a published node, this will always be empty. It will show a value on the next save, so it seems like it's updated after the Saving event, making it useless for my purposes.
There is also the e.IsSavingCulture method, but it appears that the default culture is always saved even if no changes were applied to it, making it not work for my use case.
How would I go about detecting which cultures of a node had changes applied, inside a Saving event?
is working on a reply...