Restrict manager to only see list items created by their employees in SharePoint 2010
I am using a SP2010 custom list as a weekly time sheet for an organization of about 50 employees and 8 managers to use. To create an item, an employee enters client, project, activity type, week ending, and hours in the default view. Now I want to create another view that is restricted to managers. Ideally, I want SP2010 to know who the manager is, and restrict the items they can see to be only those items created by their employees.
I tried the following with no luck.
- There is a user information list created by IT that includes all the members of my organization. I added the Manager's Name to every item.
- I re-purposed the Modified By column appeared in my custom list when I created that list.
- Specifically, I renamed the Modified By column which is a Person or Group type to Manager's Name and changed the value of Show Field: to Manager's Name. I would have rather not done it this way, but I couldn't figure out how I add a list column that is a Person or Group type, and allows you to pick a column to populate with the value I needed.
- I saved the view settings and I could see the Manager's Names in the first column for their specific employees. So far so good!
- Then I re-edited the view and created a filter that shows items when Manager's Name is equal to [ME].
- I saved the view setting and this time I could not see any employee list items which made sense since I am not a people manager.
- I had a colleague who is a people manager try it out and he saw no items for his employees, yet I know there are a dozen or so, and they showed up in #4.
- I changed the filter to look for his name 开发者_StackOverflow中文版specifically, and he still could not see his employees, although I could.
- So I figured it must be a permission level issue since his permission level was Contribute and mine is Full Control.
- I bumped him up to Design level, and he could see his employees as long as I hard-coded his name in the filter for the view.
Do someone knows how to do this easily?
From what I have learnt, there are differences in creating lists and libraries.
A library does not seem to have the functionality displaying group fields in the correct format, whereas a list does. So if you want to create a view for managers / employees then you need to do it in a list, with the manager and employee both as columns in the view.
Just ensure that the employees and managers do not have access to edit their views.
精彩评论