views:

90

answers:

2

Hello All,

We have a doc library, Requirement is that only the user who has contributed to the document should be able to see the document and other user who has access to the library should not see that.

Can you please help me to achieve this.

Update: I talked to my TL he said, we need multiple Views on the Doc Library. Any one with new Ideas?

+3  A: 
  • Add a custom view to the document library that only displays the items if the current user == creator of the document.
  • Set this view as the default view.
  • Prohibit users from changing the view.

If you are after a true permission based solution, you could develop a event handler for the adding item handler that sets the permission on the newly created item. (By breaking parent inheritance also) Set only permissions (owner) for the user that created the item.

EDIT: Just re-read your question. I didn't understand correctly. I missed the "contribution" part. Anyway, I will let my answer be here.

Magnus Johansson
Magnus thank you for the pointer. Do you think we can consider Views as security? what if the user wants to have different views for him? Is there no other possibility?
Pradeep007
@Grace Kim, a view is not a substitute for item permissions. I have added an alternative solution.
Magnus Johansson
Magnus, with "Contributed" I meant that the user who has either created / updated the document. Can you think of any other Idea?
Pradeep007
+1  A: 

Adding a view is not really good practice. If one want's to gain access to the data he can do so by working with the lists web service. the solution is much simpler then it seems. 1. you need to install this: http://spdactivities.codeplex.com/. This add-on will add you work flow activities to the SP Designer. 2. create a workflow doing what you described. It will take you no more then 10 minutes.

That's it :)

Amir