Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Content staging - user roles View modes: 
User avatar
Member
Member
joeh42 - 6/2/2011 10:05:55 AM
   
Content staging - user roles
I developed a new role for my site and changed the UI personalization for that role on the site I developed the role on our development environment, tested it, and promoted it to staging.

I then adding an additional user to the role in development, and the task "Update Role '[Role Name]'" was again created in content staging.

Based on the content staging documentation, it sounds like the role will be granted to all users who have that role in development and also exist in staging. Is that correct? Will it also remove the roles from those that lack it in development?

Is content staging configurable so that I can have specific changes not included in content staging? I.e., I always want to promote the UI personalization changes or if I renamed the display name of the role, but I don't want the promotion to affect who has what role in staging and production.

Thanks!
Joseph Hoppe

User avatar
Kentico Consulting
Kentico Consulting
kentico_borisp - 6/6/2011 9:10:31 AM
   
RE:Content staging - user roles
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

User avatar
Member
Member
joeh42 - 6/6/2011 11:13:14 AM
   
RE:Content staging - user roles
Thank you for the confirmation and explanation Boris!