diff --git a/OpenChange/MAPIStoreContext.m b/OpenChange/MAPIStoreContext.m index 4aee98acf..32a01e147 100644 --- a/OpenChange/MAPIStoreContext.m +++ b/OpenChange/MAPIStoreContext.m @@ -438,8 +438,16 @@ static inline NSURL *CompleteURLFromMapistoreURI (const char *uri) mapiStoreObjectWithSOGoObject: currentFolder inContainer: nil]; [baseFolder setContext: self]; - *folderPtr = baseFolder; - rc = MAPISTORE_SUCCESS; + + if ([[userContext sogoUser] isEqual: activeUser] + || [baseFolder subscriberCanReadMessages]) + { + *folderPtr = baseFolder; + rc = MAPISTORE_SUCCESS; + } + else + rc = MAPISTORE_ERR_DENIED; + } else if ([[userContext sogoUser] isEqual: activeUser]) rc = MAPISTORE_ERR_NOT_FOUND; diff --git a/OpenChange/MAPIStoreSOGo.m b/OpenChange/MAPIStoreSOGo.m index 41c8bf42a..604482ee7 100644 --- a/OpenChange/MAPIStoreSOGo.m +++ b/OpenChange/MAPIStoreSOGo.m @@ -244,8 +244,13 @@ static void mapiapp_cleanup(void) \details Create a connection context to the sogo backend \param mem_ctx pointer to the memory context + \param conn_info pointer to the connection information available for this context + (database connection, connected user, replica server info) + \param indexing pointer to the indexing database connection \param uri pointer to the sogo path \param private_data pointer to the private backend context + + \note the developer must free allocated private_data */ static enum mapistore_error