Quantcast
Channel: SharePoint Diary
Viewing all articles
Browse latest Browse all 1058

Set Permissions and Restrict Access to SharePoint Views

$
0
0
Little background: PMO from Sales domain came with this requirement: They Have a list for capturing project metrics in a project collaboration SharePoint Site with the below columns:
sharepoint restrict access to views

There are two requirements:
  1. When Project Managers logs in, they should get projects in which they are assigned as "Project Managers".
  2. When Program Manager logs in, He should get all of the projects.
To solve the first requirement, I asked them to set the view filter as: "[Project Manager] is equals to [ME]", simple, uh?

For the second requirement, Program Manager should get all projects, nothing comes to my mind other than creating a separate view without filters. But how do we restrict normal users/ project managers from accessing the view for Program Managers? (of course, PMOs can create private views, but they don't wanted to!). So, Lets restrict access and secure view by setting permissions.

Set Permission on SharePoint View:

SharePoint doesn't any direct ways to Set Permissions and Restrict Access to SharePoint Views Out-of-the-box. Lets use this trick to get the permissions applied to SharePoint list views.
1. Create a List view page in the list, Say "PMO.aspx"
2. Move the View to any document library (E.g. to "Site Pages" library)
3. Break the Permissions of the page, Grant access to "Program Managers" group
4. Move the View page back to List.


Here is the detailed Step by Step:

Step 1: Create a List view page in the list
Open the site in SharePoint Designer, Navigate to the List (say: Project Metrics), Right click the List in Treeview >> Click on "New" >> List View Page
sharepoint restrict access list views

Give it a Name, Say: "PMO" and click "OK". This will create new aspx page: PMO.aspx.
sharepoint secure list view

Step 2: Move the View Page to "Site Pages" Library
Since lists doesn't provide a way to apply item level permissions on list view forms, we need to move the list page to a document library, Apply the permissions and then move the view page back to the list. So lets cut the PMO.aspx from Project Metrics List
sharepoint 2010 set permissions view

Paste the PMO.Aspx into "Site Pages" Libary
set permissions on a view sharepoint

Set permissions on SharePoint views: Now, Navigate to "Site Pages" library from browser. Click on "Manage Permissions"
restrict access sharepoint views

Click on "Stop Inhering permissions" from Ribbon to break the list view's permissions.
set permissions list views sharepoint 2010
Leave the users/groups who needs access to the view and remove all others. By this we have restricted access to views with required users and groups.
restrict access to sharepoint list views
Now, Go back to the SharePoint Designer, Cut the page from "Site Pages" Library and Paste it back to "Project Metrics" list.
set permissions sharepoint list view

That's all, We are done setting permissions for SharePoint view!

When users logged in to the site, they'll get to see the secured view.
set permissions sharepoint views

But if they try to access our secured view "PMO" which is restricted access, they'll get "Access Denied"
sharepoint 2010 secure view

Viewing all articles
Browse latest Browse all 1058

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>