Hello,
Yes, every change on the staging environment will be promoted t the live site. To exclude some objects from the synchronization process, you would have to create a
CustomDataHandler and handle the creating of the synchronization tasks programmatically:
/// <summary>
/// Fires before updating data in database. Performs the additional actions before data are updated in database.
/// </summary>
/// <param name="dataObj">Data class object to update in database</param>
/// <param name="conn">GeneralConnection object to use</param>
public override void OnBeforeUpdate(object dataObj, object conn)
{
// INSERT YOUR CUSTOM BEFORE-UPDATE CODE
CMS.SettingsProvider.IInfoObject infObj = dataObj as CMS.SettingsProvider.IInfoObject;
if (infObj != null)
{
if (infObj.ObjectType == CMS.SiteProvider.SiteObjectType.USERROLE)
{
// You can use RoleID property to idetify specific role...
// CMS.SiteProvider.UserRoleInfo binding = (CMS.SiteProvider.UserRoleInfo)infObj;
// When user is assigned to a role, the staging task is not logged - applies for all roles
infObj.LogSynchronization = CMS.SettingsProvider.SynchronizationTypeEnum.None;
}
}
}
Please note, that this object won't be synchronized afterwards, if you use it somewhere else. You will need to create a new instance of it.
Best regards,
Boris Pocatko