(fix) cache sogo_folder_info records and avoid phantom subscriptions (fixes #4010)

This commit is contained in:
Ludovic Marcotte committed 2017-01-31 15:59:58 -05:00
1 parent d159b191a6
commit 15b277fa8e
4 files changed
+28 -11

No files matched your search

+1 -7
View File
@@ -291,14 +291,8 @@ static SoSecurityManager *sm = nil;
// This is important because user A could delete folder X, and user B has subscribed to it.
// If the "default roles" are enabled for calendars/address books, -validatePersmission:.. will
// work (grabbing the default role) and the deleted resource will be incorrectly returned.
//
// FIXME - 2015/01/29 - this fix (24c6c8c91d421594bd51f07904d4cd3911cd187c) was reverted. Normally, we should add
// [subscribedFolder ocsFolderForPath: [subscribedFolder ocsPath]] to check the existence of the folder but it causes
// massive SQL traffic.
//
// The proper fix would be to check upon login and only upon login if GCS folders that we're subscribed to are still existent.
//
if (subscribedFolder
&& [subscribedFolder ocsFolderForPath: [subscribedFolder ocsPath]]
&& ![sm validatePermission: SOGoPerm_AccessObject
onObject: subscribedFolder
inContext: context])