In sharepoint you can either create a personal or a public view on a document libraries, lists etc. You may come across situations where you need only a few individuals to see a particular view.
Lets take an example
Your have a custom list containing software contract information like customer, license type, product, contract date,contract currency, contract amount etc. You are required to allow everyone in the sales department to see this list however the contract amount should be visible only to few management executives. You may create 2 public views, one that has the contract amount and the other that does not. The next step would be to provide read-access to the list to all the people in the sales department.
In sharepoint, if you give read access to a list or library, the person will also have read access to all public views. which means, by default everyone is able to see both the views, one with the contract amount and the one without. Not being able to control access on views seems to be a design flaw/gap in sharepoint. I hope Microsoft will address this in the next release or a service pack. Until that time, here is a workaround that may work in some of the cases
On the list where you want to restrict access to views to a few individual:
-
Create a column called "Restricted users".
-
Column Type = Person or Group
-
Allow Multiple Selections =Yes
-
Allow Selection of = People Only
-
Choose From = All Users (This is the list of Users from your Active Directory(
-
Show Field= Name ( Choose this from the drop down)
Lets say John Smith and Jane Smith are 2 executives who need to see the list views with the contract amount
Open up the list in data sheet view. [List Name]>>Actions>> Edit In Datasheet
Scroll to the column called "Restricted Users"
Under the column, in the first cell type John Smith;Jane Smith ( These 2 names should be in AD exactly as spelled, if not find the correct spelling)
Copy this cell to the rest of the cells under the "restricted users" column and save.
Create a view for this contract list, call it "Contract-Restricted" or an appropriate name. This view should be created as a public view.
In the filter section where it says "show the items when"
-
Choose "Restricted Users" from the dropdown list
-
Condition =Is equal to
-
In the text box type [Me]
When sales people login to the site and selects the list, they will see both the views but when they choose the "Contract-Restricted" view, they will not see any results because of the filter.
The filter essentially looks at the current user logged in sharepoint, if it is John Smith or Jane Smith, the filter condition is met and it returns the result in the "contract-restricted" view otherwise the view will not return any result.
Hi,
I love this solution…thanks. However, is there a way to apply it to a group? I have 100 people that would need restricted access and trying to enter a list that big would be an administrative headache.
Thanks.
If you have lot of users, this will probably not be an elegant solution.
You might want to probably look at a 3rd party tool like the one below from datapolis,
http://www.datapolis.com/en/Offer/Products/Pages/SCP.aspx
I really like this solution as a way to keep regular SharePoint users from seeing list data they shouldn’t see. However, it should be mentioned that list data can still be exposed in at least two ways:
1. In the URL of the list view which seems to have no items, remove the “Contract-Restricted.aspx” and replace it with “DispForm.aspx?ID=1″ (where the ID number corresponds with an actual item in the list).
2. Users with Read permissions to the site/list may be able to create personal list views and select the columns they want to see.
So, it’s not foolproof, just a good, quick method for keeping honest people honest.
It’s great, works perfectly, filter even carries through to my linked view in Access. MAJOR PROBLEM, though. It seems that multiple entry person/group fields do not appear in the datasheet view in Sharepoint and therefore do not link or export to Access/Excel. Which is totally, absolutely what I have to have to make my application work.
Multiple selections do not work with Office 2003 only with 2007 or 2010.
It is not a desirable solution as any one searches for a name which a secured document might have in it, it will appear in the search result and eventually any restricted person would still be able to read that document. There should be a better way to secure this site…if anyone knows it would be nice to know.