## Private Item Handling |

Outlook allows the user to mark items in folders as "private". (Evolution allows this in Calendar and Task folders, but not Contact or Mail folders.) Private items are not supposed to show up when other users view the folder, unless they have been given explicit permission to view private items in the Delegates dialog.

Bizarrely, Exchange does not actually enforce this. Thus, when a user subscribes to another user's folder, Connector has to check whether or not the user is supposed to be able to view private items, and filter them out if not.

### Note

In Outlook and OWA, if you are not allowed to view private calendar items, they still show up in the calendar, but with the summary changed to something like "Private item", and they can't be opened. See Bug 256066.

The information about who can view private items is stored with the delegates data on the other user's mailbox. `ExchangeHierarchyForeign` checks that data, and sets its `hide_private_items` flag accordingly. (If it cannot read the delegates data, it assumes that the user is not allowed to view private items.)

`ECalBackendExchange` and `EBookBackendExchange` check the `hide_private_items` flag on the `ExchangeHierarchy` of the folder they are working with, and set their `private_item_restriction` fields accordingly:

    	hier = e_folder_exchange_get_hierarchy (cbex->folder);
    	if (hier->hide_private_items) {
    		cbex->private_item_restriction =
    			e2k_restriction_prop_int (
    				E2K_PR_MAPI_SENSITIVITY, E2K_RELOP_NE, 2);
    	} else
    		cbex->private_item_restriction = NULL;

That field is incorporated as part of the restriction in every SEARCH that they do, so that if `hide_private_items` was set, the private items will be excluded from the SEARCH results.