From b6ee4ee0dbfa119413ad0e34685d38f8282b35e5 Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Wed, 27 Jun 2018 15:39:14 -0400 Subject: [PATCH] Revert "Debugging output for subscription issue" This reverts commit c6e11606e9dd35f8eaccd1ed2966d3df47da72c4. --- SoObjects/SOGo/SOGoGCSFolder.m | 5 +---- SoObjects/SOGo/SOGoParentFolder.m | 30 ++++++++++-------------------- 2 files changed, 11 insertions(+), 24 deletions(-) diff --git a/SoObjects/SOGo/SOGoGCSFolder.m b/SoObjects/SOGo/SOGoGCSFolder.m index 34dad387a..d94487b75 100644 --- a/SoObjects/SOGo/SOGoGCSFolder.m +++ b/SoObjects/SOGo/SOGoGCSFolder.m @@ -169,10 +169,7 @@ static NSArray *childRecordFields = nil; [newFolder setOwner: login]; [newFolder setIsSubscription: localIsSubscription]; if (![newFolder displayName]) - { - [self errorWithFormat: @"No displayName for %@", newFolder]; - newFolder = nil; - } + newFolder = nil; return newFolder; } diff --git a/SoObjects/SOGo/SOGoParentFolder.m b/SoObjects/SOGo/SOGoParentFolder.m index e20861d84..99b23006e 100644 --- a/SoObjects/SOGo/SOGoParentFolder.m +++ b/SoObjects/SOGo/SOGoParentFolder.m @@ -291,28 +291,18 @@ 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, -validatePermission:.. will // work (grabbing the default role) and the deleted resource will be incorrectly returned. - if (!subscribedFolder) + if (subscribedFolder + && [subscribedFolder ocsFolderForPath: [subscribedFolder ocsPath]] + && ![sm validatePermission: SOGoPerm_AccessObject + onObject: subscribedFolder + inContext: context]) { - [self errorWithFormat: @"Can't find subscription %@", sourceKey]; - return NO; + [subscribedSubFolders setObject: subscribedFolder + forKey: [subscribedFolder nameInContainer]]; + return YES; } - if (![subscribedFolder ocsFolderForPath: [subscribedFolder ocsPath]]) - { - [self errorWithFormat: @"Folder vanished for subscription %@", sourceKey]; - return NO; - } - if ([sm validatePermission: SOGoPerm_AccessObject - onObject: subscribedFolder - inContext: context]) - { - [self errorWithFormat: @"User %@ has no right to access %@", [[context activeUser] login], sourceKey]; - return NO; - } - - [subscribedSubFolders setObject: subscribedFolder - forKey: [subscribedFolder nameInContainer]]; - - return YES; + + return NO; } - (NSException *) appendSubscribedSources