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"
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.
Posted
10-16-2007 2:28 PM
by
sam