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.


3 Answers 3



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(); } }

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):


  • 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
    Commented Sep 15, 2011 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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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