fix(eas): handle module constraints

Fixes #5456
This commit is contained in:
Francis Lachapelle
2022-01-11 13:41:49 -05:00
parent 179992c092
commit cf341822ee

View File

@@ -659,6 +659,12 @@ void handle_eas_terminate(int signum)
SOGoMailFolder *folderToUpdate;
accountsFolder = [userFolder lookupName: @"Mail" inContext: context acquire: NO];
if ([accountsFolder isKindOfClass: [NSException class]])
{
[theResponse setStatus: 403];
[self logWithFormat: @"Mail - Forbidden access for user %@", [[context activeUser] loginInDomain]];
return;
}
currentFolder = [accountsFolder lookupName: @"0" inContext: context acquire: NO];
folderToUpdate = [currentFolder lookupName: [NSString stringWithFormat: @"folder%@", serverId]
@@ -704,6 +710,12 @@ void handle_eas_terminate(int signum)
NSString *nameInCache;
appointmentFolders = [userFolder privateCalendars: @"Calendar" inContext: context];
if ([appointmentFolders isKindOfClass: [NSException class]])
{
[theResponse setStatus: 403];
[self logWithFormat: @"Calendar - Forbidden access for user %@", [[context activeUser] loginInDomain]];
return;
}
folderToUpdate = [appointmentFolders lookupName: [NSString stringWithFormat: @"%@", serverId]
inContext: context