Alert This post is over a year old, some of this information may be out of date.

SharePoint: Create permissions on list views

post

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.

  • Create a new document library. I named it “ViewsLib”, and I do not let it be shown on the quick launch.
Show image This document library will be used to store the list views.
This document library will be used to store the list views.
  • Open the site in SharePoint Designer
  • Right click on the list for which you want to create a new view, and choose “New” -> “List view page”.
Show image Create a new list view.
Create a new list view.
  • Give up a name for this view and click “OK”.
Show image Fill in the list view name
Fill in the list view name
  • Copy and paste the newly created view to the document library.
Show image Paste the view to the document library.
Paste the view to the document library.
  • Delete the view from the list, you do not need this one anymore. You will only need the one inside the document library.
  • Go to the site and check all the list views. The new view should be available.
Show image Check list views.
Check list views.
  • Modify the view to suit your needs.
Show image Modify the list view
Modify the list view
  • Inside the document library you can set item permissions on the view (ASPX Page).
Show image Manage item permissions.
Manage item permissions.
Show image 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.

Show image Test the view with a user that has no rights.
Test the view with a user that has no rights.
Show image The user will get an access denied on the view.
The user will get an access denied on the view.

Changes

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.

Show image 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.

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

Step 4

Delete the old list view from the document library.

Show image 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.

Show image Document Library View
Document Library View

Comments

Back to top