views:

10

answers:

2

Hi,

I have a custom list created in Sharepoint 2007 and displayed by a content query web part.

I would like to

  1. Show all items to general admin users except those items created by two users.
  2. The two admin users need to see all items in the list.

The first requirement is easily done by adding a filter to the view on the created by field.

The second one is where I need help, is there a way to set the view of a list based on the user logged in to acheive the second requirement?

Or is this achievable another way?

Many Thanks, Nav

A: 

If user has SPBasePermissions.ManageLists permissions, he will have permissions to view all items in the list.

If its not about permissions, but just which view which user sees by default, then it will involve some sort of coding :

  • Either you create webpart which will switch to desired view for desired user. (Involves coding, building, deploying)
  • Use content editor web part to switch with javascript - not that nice solution. (Because page would reload when you open it).
Janis Veinbergs
A: 

In the end I created two pages one called restricted and the other for all users configured the views on each page for each group of users. Then I restricted access to the 'restricted' page to the relevant users.

I used audiencing to display a link to the 'restricted' page to selected users

nav

related questions