mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-10-08 13:27:15 +00:00
feat(core): add SOGoDisableExport option to disable export for mail, calendar and contacts
This commit is contained in:
1 parent
e0ef59d5f2
commit
d0b4b50456
12 files changed
+152
-49
No files matched your search
@@ -590,8 +590,20 @@
|
||||
- (WOResponse *) exportFolderAction
|
||||
{
|
||||
WOResponse *response;
|
||||
SOGoSystemDefaults *sd;
|
||||
|
||||
response = [[self clientObject] archiveAllMessagesInContext: context];
|
||||
sd = [SOGoSystemDefaults sharedSystemDefaults];
|
||||
if (nil != [sd disableExport] && NSNotFound != [[sd disableExport] indexOfObject: kDisableSharingMail])
|
||||
{
|
||||
response = [self responseWithStatus: 401
|
||||
andJSONRepresentation: [NSDictionary dictionaryWithObject: @"Exporting mail folder is not authorized"
|
||||
forKey: @"message"]];
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
response = [[self clientObject] archiveAllMessagesInContext: context];
|
||||
}
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user