Edit only owned list items in Windows Sharepoint Services 3.0
Asked Answered
F

8

4

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?

Footstep answered 9/4, 2009 at 16:46 Comment(1)
Update - we need inheritance to work from the list down to the item so setting each item's permissions won't really work for us.Footstep
A
4

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.

Appetizing answered 7/5, 2009 at 14:20 Comment(0)
S
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

Sylphid answered 9/4, 2009 at 22:55 Comment(0)
R
1

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

Romantic answered 9/4, 2009 at 16:46 Comment(0)
L
1

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

Lutes answered 13/4, 2009 at 16:17 Comment(1)
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.Sharla
B
1

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.

Boffin answered 31/8, 2011 at 11:52 Comment(0)
S
0

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).

Sulphide answered 9/4, 2009 at 20:2 Comment(0)
S
0

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.

Sulphide answered 9/4, 2009 at 20:18 Comment(0)
Y
0

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.

Yarn answered 3/7, 2010 at 4:52 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.