Archive for the ‘Collaboration’ Category

Modify Permission Levels (using bitwise operators)


The easiest way to create a new permission level in SharePoint is to copy and modify an existing permission level. For example, you can copy the ‘Contributor’ permission level and remove the ability to delete items by unchecking the corresponding option. SharePoint 2010 even provides a ready-to-use out-of-the-box button to copy existing permission levels.

However, modifying permission levels programmatically is a little bit less obvious as the SPBasePermission enumeration is implemented as a bit flag.


Retrieving all (nested) members of a Group


You can assign permissions to users, SharePoint groups and Active Directory groups in SharePoint. While SharePoint groups cannot contain other SharePoint groups, it is possible to nest Active Directory Groups. The SharePoint method SPGroup.Users only returns users that are added directly to the SharePoint Group. I have written a small function that is able to retrieve all users of a SPPrincipal object, included nested users.


Conditionally enable/disable Ribbon buttons based on user permissions

Conditionally enable-disable Ribbon buttons based on user permissions

Using custom action you can create your own ribbon elements. In a post I have published a while ago I showed how to add a button to the ribbon to generate a QR-Code. But what if you want your button only to be enabled under certain circumstances. For example; if the user has sufficient privileges.


Document ID Hyperlink with QR Code for SharePoint 2010

Document ID Hyperlink with QR-Code for SharePoint 2010

About a month ago, Jan Tielens posted a nice solution on his blog for generating short URL’s for SharePoint 2010 documents. His solutions depends on a URL shortening services like or

As Jeroen Ritmeijer points out in his comment on the same page, this might not be a proper solution for confidential files. I wouldn’t want my ‘Plan for World Domination.docx’ leaking to the public. In this blog I try to give an alternative solution for those long hyperlinks.