Revert "Debugging output for subscription issue"

This reverts commit c6e11606e9.
This commit is contained in:
Francis Lachapelle
2018-06-27 15:39:14 -04:00
parent aa41e6d868
commit b6ee4ee0db
2 changed files with 11 additions and 24 deletions

View File

@@ -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;
}

View File

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