Monotone-Parent: 40431eed7cc9565c65c5967de069938c678f2cbc
Monotone-Revision: cfce0b87149956dcb7797ebaeafd5c803f73f50b Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2012-03-09T22:12:07 Monotone-Branch: ca.inverse.sogomaint-2.0.2
parent
8e522ca518
commit
f9e6fc7f22
|
@ -1,5 +1,10 @@
|
|||
2012-03-09 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* OpenChange/MAPIStoreFolder.m
|
||||
(-getTable:andRowCount:tableType:andHandleId:): if the current
|
||||
user is not the owner of the folder, the permissions table cannot
|
||||
be open and MAPISTORE_ERR_DENIED is now returned.
|
||||
|
||||
* SoObjects/Contacts/NGVCard+SOGo.m
|
||||
(_setupEmailFieldsInLDIFRecord:): the value of card elements were
|
||||
not properly extracted when no email field were of type "home" or
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue