oc-calendar: Add edit/delete own and Folder Contact/Owner sharing perm

By storing these custom MAPI roles in the ACL.

The extension field 'X-SOGO-COMPONENT-CREATED-BY' is used to store the
event creator when it is done from Outlook. It is the same field SOGo
uses when an event is created from a shared folder in the webmail.

The creator and the organizer/owner of the event can be different and it can
be used from external sources by checking the organizer field. This matches
the specification from [MS-OXOCAL] Section 1.1 which defines the organizer
as the owner or creator of the event.
This commit is contained in:
Enrique J. Hernández Blasco
2016-02-09 16:34:04 +01:00
parent 12ac1d30de
commit dd32c659f6
7 changed files with 111 additions and 29 deletions

View File

@@ -247,6 +247,7 @@
- (void) updateFromMAPIProperties: (NSDictionary *) properties
inUserContext: (MAPIStoreUserContext *) userContext
withActiveUser: (SOGoUser *) activeUser
isNew: (BOOL) isNew
inMemCtx: (TALLOC_CTX *) memCtx
{
BOOL isAllDay;
@@ -573,6 +574,14 @@
}
}
}
// Creator (with sharing purposes)
if (isNew)
{
value = [properties objectForKey: MAPIPropertyKey (PidTagLastModifierName)];
if (value)
[[self uniqueChildWithTag: @"x-sogo-component-created-by"] setSingleValue: value
forKey: @""];
}
}
@end