Pages

Monday, May 24, 2010

OSSSearchresults.aspx Authentication issue for limited access user

Not long after upgrading from Sharepoint 2003 to Sharepoint 2007 we started to receive calls from users who didn’t have permission to see the results pages when performing a search from within a document library.

Scenario
A user has limited access to a site, typically read/contributor access just to a single document library. The user navigates directly to the document library and discovers there are many documents to sift through so they turn to the trusted search facility in the top right which has rather help fully already selected the scope ‘Search this ’. However after applying a carefully thought through search term the user is presented with the standard Error: Access Denied instead of the OSSSearchResults.aspx page.

Root cause
In Sharepoint 2003 this scenario would have presented the user with a suitable set of results however after making a very mediocre SP 2003 search facility so very much better in SP 2007 it appears that this aspect was over looked which, IMHO, is a flaw in the design.

The OSSSearchresults.aspx permission are tied in to the site object which is fine for pretty much every other scenario, however for limited access it results in blocked access and no results for our over-whelmed users.

Workaround
For most implementations there isn’t a single fix which ticks all the boxes, there are some creative and more complicated permissions models you could follow, but you wouldn’t be searching for a fix if you were prepared to tweak the 5000 sites in your portal that have the issue…

For those who favour the dark side… Jump on to your web front ends and open the file
…\12\TEMPLATE\LAYOUTS\OSSSearchResults.aspx
Search for
Inherits="Microsoft.SharePoint.WebControls.LayoutsPageBase"
And delete it

Congrat’s you’ve just removed the troublesome results page authentication that was bothering your users and now they have access to search results they were expecting, which are still security trimmed - hooray!

However make a note of what you’ve done because this file is subject to being overwritten by some future patch, plus any future issues in this area are likely to be unsupported by MS because of this fix.

No comments:

Post a Comment