Tag: sharepoint

SharePoint Custom WebParts and list views

It looks as though I’m on a sharepoint-roll; this time I will explain how I put together a custom web part which essentially extends the existing functionality of a list view (SPListView) to execute a custom filter, which in my case required the list view to display only items made by the current user AND users in the same group as the current user (based on a group filter). So for example, let’s say you have a list of grades for a class that has group assignments. I want the list view to display only my own grades and my groupmates’ grades but ignore all others (not as a security thing, but as just a filter thing since I’d have read only access to all the grades in this example). (more…)

SharePoint Custom Claims Provider

Recently one of our customers needed a way to move incoming claims from SiteMinder/ADFS into the user properties of the person logging in. In our case, it was critical to have the e-mail claim be passed into the “Work E-mail” user property on a private SharePoint portal. While it is true that there exists built-in functionality in SharePoint 2010 that will map user properties from Active Directory to user properties and synchronize them, it will not work for the ADFS authentication claims. In our case the users we were concerned with were not the users on our customer’s active directory server, but on an external server. For this reason, any incoming claims, including the e-mail claim, were just simply ignored by SharePoint.

Microsoft advised us to develop a custom claims provider, and the task ultimately came down to me. This was entirely alien to me as I had never done anything like this before, but I managed to pull it together in about a week’s time. Given how much documentation I had to search through to achieve this seemingly simple goal, I would like to save someone out there the trouble by disclosing some of the techniques I used to achieve this. (more…)