Set Permissions For Views

Scenario

The Research department has an Ideas Library. The following are the constraints:

  1. Each employee can add / edit / delete documents to the library
  2. An employee cannot view other employee's documents
  3. The Research Head can view all the documents
  4. An employee should not be able to change a view

How to do this?

image1.png

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

Users

The 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 the default view to show only the current user items & create a restricted page to show all items

We can try the second approach.

Steps

Step 1 : Create Users

The first step is to 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.

image2.png

Step 3 : Modify View

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

image3.png

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

image4.png

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.

image5.png

Step 5 : Create Page

Now create a new page.

image6.png

Set the name of the page as "All Ideas Page".

image7.png

Choose the "Insert" tab > "Existing list" option.

image8.png

Choose the Ideas Library and click the "OK" button.

image9.png

Save the changes to page.

image10.png

Step 6 : Set Page Permissions

Now choose "Page Permissions".

image11.png

Choose the "Stop Inheriting Permissions" option

image12.png

Delete existing users & add only the "Research Head" user.

image13.png

Click the "Ok" button to save the changes.

image14.png
image1.png

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.

image15.png

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

image16.png

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.

References

http://bit.ly/10uiVpB

Summary

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

Up Next
    Ebook Download
    View all
    Learn
    View all