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.
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?
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.
Following are the users involved in this scenario:
1. Research Head
2. Engineer 1
3. Engineer 2
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.
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.
Step 3: Modify View
Open the Library and click on Library tab > Modify View button.
Modify the default view of the library by setting filter to [ME]
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.
Step 5: Create Page
Now create a new page.
Set the name of page as All Ideas Page
Choose the Insert tab > Existing list option.
Choose the Ideas Library and click OK button.
Save the changes to page.
Step 6: Set Page Permissions
Now choose Page Permissions.
Choose Stop Inheriting Permissions option
Delete existing users & add only the Research Head user.
Click Ok button to save changes.
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.
Now you can try logging in as Research Head & the page should display all document items.
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
In this article we have explored a real world scenario of setting permissions for views, although not direcly.