Several people reported some problems with the What’s New RSS Feed for SharePoint and the What’s New WebPart. When a user doesn’t has access to a SharePoint list, both components will try to obtain the necessary rights: the webpart will prompt for a new login and the RSS Feed will produce some “unexpected behaviour”. Before I jump into the technical details, here are the links to download the latest versions:
For each SharePoint list on a SharePoint site, the components need to check if the currently logged on user has rights to view the list. I did this using following line:
It seems that there are some problems using the DoesUserHavePermissions method, Philip Wheat goes into detail. Patrick Tisseghem recently posted his solution, and Philip responded. Anyway, I’ve used following code snippet to solve the issue:
private bool UserCanViewListItems(SPWeb web, SPList list)
To use the function make sure you set the CatchAccessDeniedException property of the current site to false, eg:
web.Site.CatchAccessDeniedException = false;
Kudos to the SharePoint community: thanks guys!