Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I wrote an Event Receiver on ItemAdded to automatically create a calendar (Template 106) from a ListItem (Title => Name of calendar). So far so good...

Problem of all is, that I want to delete ALL Permissions on the new Calendar. At this time the calendar gets the permissions from the parent web.

Sp what I need is the code to delete all permissions an set the Author of the ListItem, the calendar is created from, as Contributor of the new calendar.

I think this is an easy question for you but I tried already to find something in the WWW. Problem of all is, that I maybe found something but cant use it for me because this is my very first EventHandler. Normally I´ve been doing this with ClientObjectModel but this EH is for WSS 3.0, so I need to write an EH.

Thanks for all effort!

share|improve this question
    
Can't you just break the inheritance of the calendar through the portal interface ? –  Arko D Mar 20 '13 at 8:09
    
I don´t want to do that over the UI because the user who is creating an Item doesnt have the permission to do that and doing it through my hands for every single calendar isn´t possible ;-) –  Felix Zeidler Mar 20 '13 at 8:23
    
Got it with BreakRoleInheritance(false)... Thanks ;-) –  Felix Zeidler Mar 20 '13 at 19:23

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.