Categories
Server

SharePoint & Item-Level Permissions within Document Libraries

I have a love/hate relationship with SharePoint. Often the things that should be really simple, just aren’t. Take the “Item-level Permissions” option for instance. Every list appears to have this option (available via List Settings > Advanced Settings) except for document libraries. I’m sure the SharePoint Development Team at Microsoft have a very good reason for this… Step […]

I have a love/hate relationship with SharePoint. Often the things that should be really simple, just aren’t. Take the “Item-level Permissions” option for instance. Every list appears to have this option (available via List Settings > Advanced Settings) except for document libraries. I’m sure the SharePoint Development Team at Microsoft have a very good reason for this…

Step forth PowerShell!

$web = Get-SPWeb http://mysharepointsite
$list = $web.Lists[“A Document Library”]
$list.ReadSecurity = 2
$list.WriteSecurity = 2
$list.Update()
$web.Dispose()

The ReadSecurity value can be one of the following:

1 = “Read all items”
2 = “Read items that were created by the user”

The “Create and Edit access” option can also be set by specifiying a value for WriteSecurity.

1 = “Create and edit all items”
2 = “Create items and edit items that were created by the user”
4 = “None”