mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-20 12:29:29 +00:00
Monotone-Parent: 40431eed7cc9565c65c5967de069938c678f2cbc
Monotone-Revision: cfce0b87149956dcb7797ebaeafd5c803f73f50b Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2012-03-09T22:12:07 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -949,6 +949,7 @@ Class NSExceptionK, MAPIStoreFAIMessageK, MAPIStoreMessageTableK, MAPIStoreFAIMe
|
||||
{
|
||||
int rc = MAPISTORE_SUCCESS;
|
||||
MAPIStoreTable *table;
|
||||
SOGoUser *ownerUser;
|
||||
|
||||
if (tableType == MAPISTORE_MESSAGE_TABLE)
|
||||
table = [self messageTable];
|
||||
@@ -957,21 +958,31 @@ Class NSExceptionK, MAPIStoreFAIMessageK, MAPIStoreMessageTableK, MAPIStoreFAIMe
|
||||
else if (tableType == MAPISTORE_FOLDER_TABLE)
|
||||
table = [self folderTable];
|
||||
else if (tableType == MAPISTORE_PERMISSIONS_TABLE)
|
||||
table = [self permissionsTable];
|
||||
{
|
||||
ownerUser = [[self userContext] sogoUser];
|
||||
if ([[context activeUser] isEqual: ownerUser])
|
||||
table = [self permissionsTable];
|
||||
else
|
||||
rc = MAPISTORE_ERR_DENIED;
|
||||
}
|
||||
else
|
||||
{
|
||||
table = nil;
|
||||
[NSException raise: @"MAPIStoreIOException"
|
||||
format: @"unsupported table type: %d", tableType];
|
||||
}
|
||||
if (table)
|
||||
|
||||
if (rc == MAPISTORE_SUCCESS)
|
||||
{
|
||||
[table setHandleId: handleId];
|
||||
*tablePtr = table;
|
||||
*countPtr = [[table childKeys] count];
|
||||
if (table)
|
||||
{
|
||||
[table setHandleId: handleId];
|
||||
*tablePtr = table;
|
||||
*countPtr = [[table childKeys] count];
|
||||
}
|
||||
else
|
||||
rc = MAPISTORE_ERR_NOT_FOUND;
|
||||
}
|
||||
else
|
||||
rc = MAPISTORE_ERR_NOT_FOUND;
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user