mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-03-26 00:22:44 +00:00
oc: API to know if a message can be deleted by a subscriber
Instead of asking general container. This gives the possibility to perform the deletion depending on the data from the message, for instance, the user creator.
This commit is contained in:
@@ -547,7 +547,8 @@ rtf2html (NSData *compressedRTF)
|
||||
for (count = 0; count < max; count++)
|
||||
[[containerTables objectAtIndex: count] restrictedChildKeys];
|
||||
}
|
||||
|
||||
|
||||
/* TODO: Check the save process succeeded */
|
||||
[self save: memCtx];
|
||||
/* We make sure that any change-related properties are removed from the
|
||||
properties dictionary, to make sure that related methods will be
|
||||
@@ -649,8 +650,7 @@ rtf2html (NSData *compressedRTF)
|
||||
if (userIsOwner
|
||||
|| ([self isKindOfClass: MAPIStoreEmbeddedMessageK]
|
||||
&& [mainMessage subscriberCanModifyMessage])
|
||||
|| [(MAPIStoreFolder *)
|
||||
[mainMessage container] subscriberCanDeleteMessages])
|
||||
|| [mainMessage subscriberCanDeleteMessage])
|
||||
access |= 0x04;
|
||||
|
||||
*data = MAPILongValue (memCtx, access);
|
||||
@@ -987,14 +987,22 @@ rtf2html (NSData *compressedRTF)
|
||||
return activeUserRoles;
|
||||
}
|
||||
|
||||
/* Can the current active user read the message? */
|
||||
- (BOOL) subscriberCanReadMessage
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
|
||||
/* Can the current active user modify the message? */
|
||||
- (BOOL) subscriberCanModifyMessage
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
|
||||
/* Can the current active user delete the message? */
|
||||
- (BOOL) subscriberCanDeleteMessage
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user