SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Say I have a document Library "TravelRequests" and five different content types associated with library. Is there a way to apply permission for a given content type "ManagerCT"? When managers are uploading item to this library they pick ManagerCT content type and load items with metadata. Now I dont want Joe Smith who is custodian to see the items that that has ManagerCT associated with them.

Possible? if yes, how... Any help would be great.


share|improve this question
up vote 0 down vote accepted

Looks like this guy has to solution. I still have to use ItemAdded event handler.

 public class ItemSet : SPItemEventReceiver
       public override void ItemAdded(SPItemEventProperties properties)

SPWeb web = properties.OpenWeb(); SPList list = web.Lists[properties.ListId]; SPRoleAssignmentCollection roles = list.RoleAssignments;; SPListItem addedItem = properties.ListItem; addedItem.BreakRoleInheritance(false); foreach (SPRoleAssignment r in roles) { if (r.Member.Name.ToString().StartsWith(properties.ListItem.ContentType.Name .ToString(), StringComparison.CurrentCultureIgnoreCase)) { addedItem.RoleAssignments.Add(r); } } this.DisableEventFiring(); addedItem.Update(); this.EnableEventFiring(); } }
share|improve this answer

You can set a List Item Event Handler on the "TravelRequests" library, override the "ItemAdding" method, which will give you a reference to the actual item (passed in through SPItemEventProperties.ListItem property,) and check for the value of "ManagerCT" being assigned to the item's ContentType field.

If assigned, you can alter the item level permission; (but not without reading the following article describing the gotcha's of doing this programatically):

share|improve this answer
I have done item level permission with event handler. I was hoping sp2010 might have better way of handling these type of situation. Thanks gn22. I just needed confirmation that there is no OOTB solution for this or 3rd party. – Raula Ryan Sep 15 '11 at 3:14

You can do this with SharePoint Designer List Workflows using an Impersonation Step. In the Impersonation Step you can alter permissions of an item in the list. First check the valule of the Content type in the current list. If the value of the content type is "Manager CT" create an impersonation step and change your permissions. Choose the action "Replace List Item Permissions" and set the new permissions on the item. Remember that you need to re-grant permission for every group because the action "Replace List Item Permissions" removes all permission that are exisiting.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.