Hi all, somehow i stumbled into this problem today, and cant seem to fix it.
Situation:
EWS 1.1
Exchange 2007 SP3
.NET4 VS2010 SP1
Two normal accounts, no delegation/impersonation.
User A has Author permissions to user B calendar folder. User A wants to delete all appointments he has delete rights for.
// setup calendarview CalendarView calendarView = new CalendarView(DateTime.Today, DateTime.Today.AddMonths(1)); calendarView.PropertySet = new PropertySet(ItemSchema.ItemClass, ItemSchema.EffectiveRights, ItemSchema.Categories); //the actual ews call FindItemsResults<Appointment> findResults = CalendarFolder.Bind(service, calendarFolderId).FindAppointments(calendarView); foreach (Appointment appointment in findResults.Items) { if (appointment.EffectiveRights.HasFlag(EffectiveRights.Delete)) { // normally you would delete the appointments here
}
else { // i would expect i cannot delete the appointment here, in fact i can. That makes this effectiverights property useless
} }
Somehow the EffectiveRights flag is ALWAYS set to 'Read'.
I just want to be sure that if i delete an appointment, i actually have the rights to do that.
The response XML shows the effective rights, that only has read set to true while i expect delete to be true asswell :
<t:CalendarItem>
<t:ItemId Id="{id}=" ChangeKey="DwAAABYAAACiMyJAq8rTRpj8V9OP3cCLAC+MueIa" />
<t:ItemClass>IPM.Appointment</t:ItemClass>
<t:Categories>
<t:String>Digirooster</t:String>
</t:Categories>
<t:EffectiveRights>
<t:CreateAssociated>false</t:CreateAssociated>
<t:CreateContents>false</t:CreateContents>
<t:CreateHierarchy>false</t:CreateHierarchy>
<t:Delete>false</t:Delete>
<t:Modify>false</t:Modify>
<t:Read>true</t:Read>
</t:EffectiveRights>
</t:CalendarItem>