Permissions to see checked in but not published content
-
22-10-2019 - |
Question
I'm working on a SharePoint 2010 publishing website where content authoring happens on an authoring site, e.g. http://authoring, and scheduled content deployment jobs deploy published content to a public site, e.g. http://public.
To simulate a staging environment, I would like users to be able to see checked in but not published content.
I know that members of the Visitors group can see published content. However, published content is also picked up by the next content deployment job.
Is there such a combination of permissions that allows people to view checked in but not published content, but not be able to edit it?
Solution
I do not believe that is possible. The normal path is Draft, Checked-in, published/approved. I don't see a way to let a group see the last one, but not the second one.
OTHER TIPS
I ended up writing a script that set the appropriate draft visibility on every PublishingWeb in my site. Long term, I also need to add an event receiver that sets this property on each site as it is created.
Add-PSSnapin Microsoft.SharePoint.Powershell -ErrorAction:SilentlyContinue
$rootUrl = "http://localhost"
function SetDraftVisibilitySettings($rootUrl)
{
$site = Get-SPSite -Identity $rootUrl
#Walk through each PublishingWeb
$site | Get-SPWeb -limit all | ForEach-Object {
#Check to see if site is a publishing site
if ([Microsoft.SharePoint.Publishing.PublishingWeb]::IsPublishingWeb($_))
{
write-host "Setting draft visibility in pages library in"$_.Title"site...."
$publishingWeb = [Microsoft.SharePoint.Publishing.PublishingWeb]::GetPublishingWeb($_)
$pagesListName = [Microsoft.SharePoint.Publishing.PublishingWeb]::GetPagesListName($publishingWeb.Web)
#Set draft visibility to "Any users who can read items"
$pagesList = $_.Lists[$pagesListName]
$pagesList.DraftVersionVisibility = 0
$pagesList.Update();
}
}
$site.Dispose()
}
SetDraftVisibilitySettings($rootUrl)