Edit only owned list items in Windows Sharepoint Services 3.0

30,073

Solution 1

WSS has a basic UI for setting item-level permission on list items, but they hide that from the UI for document libraries. If you go into Settings->List Settings->Avanced settings for a list, you'll see the options to do pretty much what you're asking for. However, on document libraries, that UI is not available. The settings it drives, though are avaiable via the object model.

You could set those same properties for a document library like this:

SPDocumentLibrary onlyOwnLib = theWeb.Lists["DocLibName"]  
onlyOwnLib.WriteSecurity = 2;  
onlyOwnLib.Update();  

And that should about do it. However, apparently that doesn't really set permissions; it just controls what the user can do via the UI. If they had another interface to the library (like via WebDAV) or list (like via the web services), it wouldn't prevent them from editing items they didn't create. If you want true item-level permissions, I think you need to go the event handler route.

This post from Matt Morse explains it in more detail, and he even wrote a command line tool to set the property (plus the .ReadSecurity property) for lists and libraries.

Solution 2

If you added an event handler to the document list you should be able to limit edit rights on that item to the user that created the item.

I often have to copy documents from another system into a list in SharePoint, and in that case the edit rights will be assigned to the system user that transfered the document, unless you use the approach suggested by Kirk Liemohn here

Solution 3

Note that item level permissions on large numbers of documents increase the load on your SQL server quite a lot.

Solution 4

This is an old question, however the problem still exists.

A way that has worked well for me in the past is to use a workflow to configure the permissions when the library item is added.

See http://www.sharepointusecases.com/index.php/2010/03/configure-item-level-permissions-for-document-libraries-part-2/ for details.

Share:
30,073
dirq
Author by

dirq

Daddy, web developer, home brewer, and musician living near Milwaukee, WI.

Updated on July 09, 2022

Comments

  • dirq
    dirq almost 2 years

    Is there a way to limit the "edit item" permission in WSS 3.0 to only allow a user to edit his own documents or list items? We need the ability for a user to edit only documents/list items he creates - NOT items that someone else created. So, essentially we need a sub-set of the EDIT permission as well as ADD.

    Is this possible in Windows Sharepoint Services 3.0? Is there a way to create custom permissions in code or a feature?

  • Colin
    Colin almost 15 years
    And eventually causes some stored procedures to break. We had a large doc lib in which every item had it's own security. When we tried to query the items, it would not return all expected result. SPQuery reverts to Temporary tables after 10 joins and then just gives up... After splitting the doc lib into smaller portions everything was working again.