views:

5035

answers:

7

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?

A: 

I believe that permissions like that can be created through the user interface. It depends on the scale and number of list items you have, but you could do one of two things. First (without having to create scripts) you could give everyone a custom "Read" permission access which would not allow them to do everything you can in in the Read permission but allow them to Add Items. Then on an item-by-item basis, click the item -> manage permissions -> (Give the specific user Contribute permissions on their document).

If you're creating a SharePoint list that this will not be practical, you can create a script to traverse through all items, and will verify the user has contribute permissions (otherwise it will set the contribute permission to that user).

Brian
A: 

Additionally, you could just give each person their own folder.

Give everyone read permissions on the SharePoint list/document library, but give each person full control privileges over their own folder. This will allow everyone to read everything in a list, but create/edit their own documents.

Brian
+2  A: 

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

Kasper
+1  A: 

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

Andy Burns
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.
Colin
+2  A: 

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.

Abs
A: 

here is the solution for your request. go to the list -> list settings -> Advanced Settings

you will see the section of

Read access: Specify which items users can read

All items Only their own

Edit access: Specify which items users can edit

All items Only their own None

select the options based on requirement. that's it done.. wanna more click on http:// mastermoss.wordpress.com

A: 

If you want the 'Only their own' permission on a document library, it isn't there out of the box. But I've created a solution at CodePlex that adds this for Document Libraries - check it out at http://moresharepoint.codeplex.com.

Tim Larson

related questions