0

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?

1
  • can anyone share the code -appreciate help?
    – user14530
    Commented Jan 30, 2013 at 23:51

3 Answers 3

0

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.

1

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

1
  • This is the method i used. The ability to change permissions is only available in the actions of a workflow using an impersonation step
    – dmce
    Commented Mar 11, 2015 at 8:46
1

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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