Archive for the ‘Content Management’ Category

Modify Permission Levels (using bitwise operators)

permission-level-teaser

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.

(more…)

A weather forecast WebPart using JSONP

Weather-WebPart-teaser

My previous post shed some light on JSONP and how it works. In this post I will describe how to create a cool SharePoint 2010 WebPart that shows weather forecasts. The actual forecast data is retrieved from the Yahoo Weather Service  using a JSONP call.

(more…)

Weird bug while updating WelcomePage using C#

weird-bug-while-updating-welcomepage-using-c

You can change the WelcomePage of your site by updating the value of SPFolder.WelcomePage. However, you might experience some strange behavior if your are trying to update this value directly.
(more…)

Periodically upload files to SharePoint using Powershell

Periodically upload files to SharePoint using Powershell

You can use Powershell to upload files to a SharePoint document library. Let’s say some application is generating reports in C:\Reports and you want to periodically upload them to a document library Shared Documents. By sheduling a PowerShell script and uploading all files in a certain directory to SharePoint you can access of all your important reports via SharePoint.

(more…)