Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

How do you set the permission on the document library to allow only authors of the document to edit it and all other users will have read-only access? Can this be done on the check out/check in process as well?

share|improve this question
    
can anyone share the code -appreciate help? –  user14530 Jan 30 '13 at 23:51
add comment

3 Answers

up vote 0 down vote accepted

You can use event handlers to control edit permissions.

You can have an event handler that registers an event using the SPEventReceiverType.ItemUpdating and SPEventReceiverType.ItemUpdated methods, and then use code to control whether the update should be allowed.

This is extremely powerful, because you can make security decision based on any metadata of a list or item, without affecting the view rendering performance.

share|improve this answer
add comment

We have used workflow, which executes when new item is added and it sets editing permission for the author.

share|improve this answer
add comment

I have dealt with this situation before and the simplest solution coming right out of my mind now, is to create an event handler which will run when the document is uploaded. The code within the handler will remove all permissions and will grant only the admin/contribute rights to the document owner. Also for all the documents that are already present in the library, one can write a simple C# application that you can run to again do the same as above. Hope I have explained it clearly.

Thanks, Sachin

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.