If you’re using roles and the staging module in Kentico, a change to the role record will not only push through that record, but will synchronise the related user-role entries as well. Once the role has been staged, your user-roles on the destination environment will be the same as on the source (users will be added or removed from the role). Depending on how you’re using staging with your environments, this may not be desired behaviour. This article explores one way to manage this – how you can exclude roles from being staged (or other objects!), without affecting any other staging settings.
From time to time when building Kentico sites it can be useful for elements on your page or in your code to know whether they are being viewed and executed on the live site, in the page tab, or even in design mode. The good news is that you can do this, and easily! The key to it is CMS.PortalEngine.PortalContext.ViewMode . Continue reading