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:
Wolfgang Sourdeau
2012-03-09 22:12:07 +00:00
parent 8e522ca518
commit f9e6fc7f22
2 changed files with 23 additions and 7 deletions

View File

@@ -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;
}