none
Item level and column level permissions in Sharepoint 2010

    Question

  • Hi,
    I'm looking for Item and column level permisions on the List item. Following is the scenario:
    A "Timesheet" can be created by a Supervisor or Staff, if created by Supervisor, the staff should only have read-only access except for the total hrs worked that they can modify. Supervisor should be able to approve (yes/no list field) or change the item. Supervisor will have full access to the list item but should not be able to access the List items of other Supervisors.

    Timesheet - is a List in Sharepoint 2010
    Supervisor/ Staff - are members of Active Directory

    I'm not sure how to implement something like this in Sharepoint 2010, please could someone point me in the right direction. If not the whole scenario can be implemented, please let me know how much can be implemented in sharepoint 2010.

    Thanks
    Himanshu

    Monday, June 03, 2013 3:22 PM

Answers

  • SharePoint doesn't provide column level permissions out of the box. There are third party add-ons that can provide this though.

    One way you could work around this, is by restricting edit access to the list to managers, then provide a custom form for adding/editing timesheets by staff. You would then elevate permissions when ordinary users edit items (you can then control when a user is allowed to edit an item based on your rules).

    As an example of elevating permissions:

    if(userAllowedToUpdateTimeSheet)
    {
    	SPWeb web = SPContext.Current.Site.RootWeb;
    	try
    	{
    		SPUser system = web.Users[@"SharePoint\system"];
    		SPUserToken systemT = system.UserToken;
    		using (var elevatedSite = new SPSite(web.Site.Url, systemT))
    		{
    			using (var elevatedWeb = elevatedSite.RootWeb)
    			{
    				//Update the list item
    			}
    		}
    	}
    }


    Regards, Matthew
    MCPD | MCITP
    My Blog
    Please remember to click "Mark As Answer" if a post solves your problem or "Vote As Helpful" if it was useful.

    I just added a webpart to the TechNet Gallery that allows administrative users to upload, crop and format user profile photos. Check it out here: Upload and Crop User Profile Photos

    • Proposed as answer by Gunesh Vummiti Monday, June 03, 2013 4:21 PM
    • Marked as answer by maverickHT Monday, June 10, 2013 8:09 AM
    Monday, June 03, 2013 3:42 PM

All replies

  • Hi.

    I recently collaborated on a project  in which we have implemented something similar.
    The solution we used was to create a custom field for each tiplogia field (text, date ...) and rewrite all the logic from the principle of rendering of the information, based on the permission assigned to the single field.


    Regards,
    Bubu
    http://zsvipullo.blogspot.it

    Please mark my answer if it helped you, I would greatly appreciate it.

    Monday, June 03, 2013 3:41 PM
  • SharePoint doesn't provide column level permissions out of the box. There are third party add-ons that can provide this though.

    One way you could work around this, is by restricting edit access to the list to managers, then provide a custom form for adding/editing timesheets by staff. You would then elevate permissions when ordinary users edit items (you can then control when a user is allowed to edit an item based on your rules).

    As an example of elevating permissions:

    if(userAllowedToUpdateTimeSheet)
    {
    	SPWeb web = SPContext.Current.Site.RootWeb;
    	try
    	{
    		SPUser system = web.Users[@"SharePoint\system"];
    		SPUserToken systemT = system.UserToken;
    		using (var elevatedSite = new SPSite(web.Site.Url, systemT))
    		{
    			using (var elevatedWeb = elevatedSite.RootWeb)
    			{
    				//Update the list item
    			}
    		}
    	}
    }


    Regards, Matthew
    MCPD | MCITP
    My Blog
    Please remember to click "Mark As Answer" if a post solves your problem or "Vote As Helpful" if it was useful.

    I just added a webpart to the TechNet Gallery that allows administrative users to upload, crop and format user profile photos. Check it out here: Upload and Crop User Profile Photos

    • Proposed as answer by Gunesh Vummiti Monday, June 03, 2013 4:21 PM
    • Marked as answer by maverickHT Monday, June 10, 2013 8:09 AM
    Monday, June 03, 2013 3:42 PM