Reverted bug fix from #3054 and added comment

This commit is contained in:
Ludovic Marcotte
2015-01-29 16:21:06 -05:00
parent 4cc158043e
commit 723a9d4e08

View File

@@ -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])