locked
Filter document library view for current user only RRS feed

  • Question

  • Hello all, i want filter the document library view for current user only. current user should not able to see the other user's documents.

    Thanks & Regards

    Swapnil M.

    Thursday, May 17, 2012 11:46 AM

Answers

  • Hi,

    You can create a view with a filter that only shows documents that belong to the logged in user but a smart user will be able to find a way to get to a view where all the documents are visible.

    You can change the item permissions, as mentioned by Ashar, but remember that managing a document library with a lot of unique item permissions is really difficult to manage. 

    SharePoint Designer 2010 has an impersonation step you can use to create unique permissions.


    Blog: www.jasperoosterveld.com Twitter: @SharePTJasper

    • Marked as answer by Emir Liu Thursday, May 24, 2012 2:55 AM
    Thursday, May 17, 2012 1:04 PM
  • There is an out-of-the-box web part called Relevant Documents. Your requirement is exactly what it is intended to do. 

    In a page when adding a web part choose Content RollUp > Relevant Documents. Then edit the web part and scroll down to Data...there you'll see you can select documents that: 

    - Include documents last modified by me

    - Include documents created by me

    - Include documents checked out to me

    - Display a link to the containing folder or list. 

    -m

    • Proposed as answer by Ashish-Mishra Friday, May 18, 2012 6:58 AM
    • Marked as answer by Emir Liu Thursday, May 24, 2012 2:55 AM
    Thursday, May 17, 2012 9:50 PM
  • Swapnil,

    you can create a new view with filter set to 'Created By' = [Me]

    please check the below link for more details

    http://sharepointchick.com/archive/2009/07/16/creating-a-custom-view-that-filters-on-the-current-user.aspx


    Please Mark Post as Answer once you get the solution for your issues.

    Thanks,
    Kunal Govani

    • Proposed as answer by Ashish-Mishra Friday, May 18, 2012 6:58 AM
    • Marked as answer by Emir Liu Thursday, May 24, 2012 2:55 AM
    Friday, May 18, 2012 5:48 AM

All replies

  • Hi Swapnil,

    There is no out of box security settings available in document library like List where you can achieve your requirement. To achieve this you have to write event receiver code where you need to assign permission to owner of the document.The other option is individually you can set permission for each document without writing any code.

    take help from  http://www.chaholl.com/archive/2009/12/12/programmatically-set-item-level-security-in-a-document-library.aspx


    Please click "Propose As Answer" if a post solves your problem or "Vote As Helpful" if a post has been useful to you.


    • Edited by Nazre1 Thursday, May 17, 2012 12:52 PM
    Thursday, May 17, 2012 12:50 PM
  • Hi,

    You can create a view with a filter that only shows documents that belong to the logged in user but a smart user will be able to find a way to get to a view where all the documents are visible.

    You can change the item permissions, as mentioned by Ashar, but remember that managing a document library with a lot of unique item permissions is really difficult to manage. 

    SharePoint Designer 2010 has an impersonation step you can use to create unique permissions.


    Blog: www.jasperoosterveld.com Twitter: @SharePTJasper

    • Marked as answer by Emir Liu Thursday, May 24, 2012 2:55 AM
    Thursday, May 17, 2012 1:04 PM
  • There is an out-of-the-box web part called Relevant Documents. Your requirement is exactly what it is intended to do. 

    In a page when adding a web part choose Content RollUp > Relevant Documents. Then edit the web part and scroll down to Data...there you'll see you can select documents that: 

    - Include documents last modified by me

    - Include documents created by me

    - Include documents checked out to me

    - Display a link to the containing folder or list. 

    -m

    • Proposed as answer by Ashish-Mishra Friday, May 18, 2012 6:58 AM
    • Marked as answer by Emir Liu Thursday, May 24, 2012 2:55 AM
    Thursday, May 17, 2012 9:50 PM
  • Swapnil,

    you can create a new view with filter set to 'Created By' = [Me]

    please check the below link for more details

    http://sharepointchick.com/archive/2009/07/16/creating-a-custom-view-that-filters-on-the-current-user.aspx


    Please Mark Post as Answer once you get the solution for your issues.

    Thanks,
    Kunal Govani

    • Proposed as answer by Ashish-Mishra Friday, May 18, 2012 6:58 AM
    • Marked as answer by Emir Liu Thursday, May 24, 2012 2:55 AM
    Friday, May 18, 2012 5:48 AM