Set Permissions for Views

I had a requirement from customer to set permissions for Views. You very well know that we cannot set permissions for Views. SharePoint 2010 out-of-the-box does not have support for view permissions.

Scenario

The Research department is having an Ideas Library. Following are the constraints:

1. Each employee can add / edit / delete documents to the library

2. Employee cannot view other employee’s documents

3. Research Head can view all the documents

4. Employee should not be able to change View

How to achieve this?

image

The common way of view creation with filter does not work here as the user may change the view. Plus the item filtering options for Lists & Survey Lists are not available for document libraries.

Users

Following are the users involved in this scenario:

1. Research Head

2. Engineer 1

3. Engineer 2

Solutions

There are 2 solutions for this problem:

· Create multiple views with filtering & use SharePoint Designer to set View Permission

· Modify default view to show only current user items & create a restricted page to show all items

We can try the second approach.


Steps

Step 1: Create Users

As the first step create the following users in Active Directory or in User Accounts.

1. Research Head (researchhead)

2. Engineer 1 (engineer1)

3. Engineer 2 (engineer2)

Step 2: Create Library

Create a new document library named Ideas Library and set contribute permissions for all users.

image

Step 3: Modify View

Open the Library and click on Library tab > Modify View button.

image

Modify the default view of the library by setting filter to [ME]

image

Click OK to save changes.


Step 4: Upload Documents

Open another browser & login as Engineer 1. Upload a document. Repeat the process for Engineer 2.

Now there are 2 documents, but each engineer can view only their documents.

image

Step 5: Create Page

Now create a new page.

image

Set the name of page as All Ideas Page

image

Choose the Insert tab > Existing list option.

image

Choose the Ideas Library and click OK button.

image

Save the changes to page.

image

Step 6: Set Page Permissions

Now choose Page Permissions.

image

Choose Stop Inheriting Permissions option

image

Delete existing users & add only the Research Head user.

image

Click Ok button to save changes.

image

image

If the buttons are not enabled, you might need to refresh the page.

Step 7: Test the Page

You can open the page from Site Actions > View All Site Content > Site Pages library.

image

Now you can try logging in as Research Head & the page should display all document items.

image

So this concludes our article. Now the engineers can post their ideas, without seeing each other’s. The Research Head can view all the submitted ideas. All are happy J

References

http://bit.ly/10uiVpB

Summary

In this article we have explored a real world scenario of setting permissions for views, although not direcly.

Leave a Reply

Your email address will not be published. Required fields are marked *