From 723a9d4e080644a7a8cef60de9b7450621f0964e Mon Sep 17 00:00:00 2001 From: Ludovic Marcotte Date: Thu, 29 Jan 2015 16:21:06 -0500 Subject: [PATCH] Reverted bug fix from #3054 and added comment --- SoObjects/SOGo/SOGoParentFolder.m | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/SoObjects/SOGo/SOGoParentFolder.m b/SoObjects/SOGo/SOGoParentFolder.m index c0b44c5a4..501f90f9f 100644 --- a/SoObjects/SOGo/SOGoParentFolder.m +++ b/SoObjects/SOGo/SOGoParentFolder.m @@ -297,8 +297,14 @@ 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])