SharePoint: Create permissions on list views

November 18, 2010

First of all I've tried the same approach for SharePoint 2010 and this works the same way.

One of the things I miss the most in SharePoint 2007 is to set permissions on list views. I thought it was impossible to achieve this with the out-of-the-box functionality of SharePoint. After some research I found a way to achieve all this. My goal was to do it without writing or modifying any code in SharePoint. The solution consists of a number of manual steps, that I will describe in detail below, to accomplish this.

The idea was to place a list view inside a document library, so you can handle it as an ordinary document inside a list.

SharePoint Designer 2007 is necessary for the following steps.

  1. Create a new document library. I named it "ViewsLib", and I do not let it be shown on the quick launch.

    ViewsLib Library

    This document library will be used to store the list views.

  2. Open the site in SharePoint Designer
  3. Right click on the list for which you want to create a new view, and choose "New" -> "List view page".

    Create a List View Page

    Create a new list view.

  4. Give up a name for this view and click "OK".

    Enter the list view name

    Fill in the list view name

  5. Copy and paste the newly created view to the document library.

    Paste the view

    Paste the view to the document library.

  6. Delete the view from the list, you do not need this one anymore. You will only need the one inside the document library.
  7. Go to the site and check all the list views. The new view should be available.

    Check list views

    Check list views.

  8. Modify the view to suit your needs.

    Modify the list view

    Modify the list view.

  9. Inside the document library you can set item permissions on the view (ASPX Page).
    Manage item permissions

    Manage item permissions.

    Edit item permissions.

    Edit item permissions.

When you test this view you will see that SharePoint will redirect you to the page in the document library.

So this is all you need to do. When you check the view with a user that has no permissions, he will get an access denied.

Reader Test View

Test the view with a user that has no rights.

Access Denied

The user will get an access denied on the view.


Updates for Document Libraries: 31/05/2012

The previous approach does not work for Document Library views. When you try to copy the files you retrieve the following error message:
Server error: You cannot copy or move files between the Forms directory and a document library. First copy the file outside of the site and then upload from that location.

The following approach can be followed in order to achieve a restricted view for document libraries.

Step 1

Create a new list view for the document library, and navigate to the document library in SharePoint Designer.

Document library view

Document library view

Step 2

Double-click on the list view, this will open the list view in SharePoint Designer.

Step 3

Click File -> Save As.

Save As

Save As

In the save as pop-up windows, navigate to the list view document library, and save your file.
Save in

Save in

Step 4

Delete the old list view from the document library.

Delete the old list view

Delete the old list view

Step 5

Now you can set the item permissions on the document library view. The new view will already be available in the document library.

Document Library View

Document Library View