Mar 24, 2010 at 11:59 PM
Edited Mar 25, 2010 at 12:02 AM
You can do that. It requires modifying SyndicationHandler.cs in the BE Core and recompiling the core, to produce a new BlogEngine.Core.dll file for the BIN directory.
SyndicationHandler.cs is in Web\HttpHandlers.
In there, if you search, two times there is:
return item.IsVisible == true;
You would want to change both instances to:
return item.IsVisibleToPublic || System.Threading.Thread.CurrentPrincipal.IsInRole(BlogSettings.Instance.AdministratorRole);
This would prevent Editors from seeing unpublished posts.
EDIT: There's also a couple of similar checks in SyndicationGenerator.cs in the BE core. But it shouldn't be necessary to modify these checks, because the posts filtered in SyndicationHandler are fed to SyndicationGenerator.
Since the changes listed above would already filter the unpublished posts for just administrators in SyndicationHandler, it won't hurt to leave the checks in SyndicationGenerator alone.