Monotone-Parent: 2a01eb91060e570b3c80b7c6f5cfc53ea0e7f0d6
Monotone-Revision: 2193e23375baaebca1fbc25ff41ad6e10465c010 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2011-12-02T17:16:02 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
parent
c5e1b23a7a
commit
4b1c26743f
|
@ -1,5 +1,9 @@
|
||||||
2011-12-02 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
2011-12-02 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||||
|
|
||||||
|
* OpenChange/MAPIStoreMessage.m (-getPrAccess:inMemCtx:)
|
||||||
|
(-getPrAccessLevel:inMemCtx:): reimplemented methods in a generic
|
||||||
|
way just like the MAPIStoreFolder versions.
|
||||||
|
|
||||||
* OpenChange/MAPIStoreFSMessage.m (-subscriberCanModifyMessage):
|
* OpenChange/MAPIStoreFSMessage.m (-subscriberCanModifyMessage):
|
||||||
handle the case where the message is being created.
|
handle the case where the message is being created.
|
||||||
|
|
||||||
|
|
|
@ -544,32 +544,61 @@ rtf2html (NSData *compressedRTF)
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrAccess: (void **) data // TODO
|
/*
|
||||||
|
Possible values are:
|
||||||
|
|
||||||
|
0x00000001 Modify
|
||||||
|
0x00000002 Read
|
||||||
|
0x00000004 Delete
|
||||||
|
0x00000008 Create Hierarchy Table
|
||||||
|
0x00000010 Create Contents Table
|
||||||
|
0x00000020 Create Associated Contents Table
|
||||||
|
*/
|
||||||
|
- (int) getPrAccess: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
*data = MAPILongValue (memCtx, 0x03);
|
uint32_t access = 0;
|
||||||
|
BOOL userIsOwner;
|
||||||
|
MAPIStoreContext *context;
|
||||||
|
|
||||||
|
context = [self context];
|
||||||
|
userIsOwner = [[context activeUser] isEqual: [context ownerUser]];
|
||||||
|
if (userIsOwner || [self subscriberCanModifyMessage])
|
||||||
|
access |= 0x01;
|
||||||
|
if (userIsOwner || [self subscriberCanReadMessage])
|
||||||
|
access |= 0x02;
|
||||||
|
if (userIsOwner || [(MAPIStoreFolder *) container subscriberCanDeleteMessages])
|
||||||
|
access |= 0x04;
|
||||||
|
|
||||||
|
*data = MAPILongValue (memCtx, access);
|
||||||
|
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrAccessLevel: (void **) data // TODO
|
/*
|
||||||
|
Possible values are:
|
||||||
|
|
||||||
|
0x00000000 Read-Only
|
||||||
|
0x00000001 Modify
|
||||||
|
*/
|
||||||
|
- (int) getPrAccessLevel: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
*data = MAPILongValue (memCtx, 0x01);
|
uint32_t access = 0;
|
||||||
|
BOOL userIsOwner;
|
||||||
|
MAPIStoreContext *context;
|
||||||
|
|
||||||
|
context = [self context];
|
||||||
|
userIsOwner = [[context activeUser] isEqual: [context ownerUser]];
|
||||||
|
if (userIsOwner || [self subscriberCanModifyMessage])
|
||||||
|
access = 0x01;
|
||||||
|
else
|
||||||
|
access = 0;
|
||||||
|
*data = MAPILongValue (memCtx, access);
|
||||||
|
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
// - (int) getPrViewStyle: (void **) data
|
|
||||||
// {
|
|
||||||
// return [self getLongZero: data inMemCtx: memCtx];
|
|
||||||
// }
|
|
||||||
|
|
||||||
// - (int) getPrViewMajorversion: (void **) data
|
|
||||||
// {
|
|
||||||
// return [self getLongZero: data inMemCtx: memCtx];
|
|
||||||
// }
|
|
||||||
|
|
||||||
- (int) getPidLidSideEffects: (void **) data // TODO
|
- (int) getPidLidSideEffects: (void **) data // TODO
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue