mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-07 22:38:51 +00:00
Monotone-Parent: be540f76fdae4a96eb16cea471d65d8da30b9428
Monotone-Revision: 3c3b185ac78cbde20c55f90c27b4f32909f9fdbf Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2010-06-02T16:37:43 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
2010-06-02 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* SoObjects/Contacts/SOGoContactFolders.m (-appendSystemSources):
|
||||
we now add public sources to the list of folders if and only if
|
||||
the active user is the owner of the current parent folder.
|
||||
|
||||
* SoObjects/SOGo/SOGoWebAuthenticator.m (-userInContext): if the
|
||||
returned user has the login "anonymous", we return a corresponding
|
||||
instance of SOGoUser to make sure methods are never invoked on
|
||||
|
||||
@@ -58,18 +58,25 @@
|
||||
NSEnumerator *sourceIDs;
|
||||
NSString *currentSourceID, *srcDisplayName, *domain;
|
||||
SOGoContactSourceFolder *currentFolder;
|
||||
SOGoUser *currentUser;
|
||||
|
||||
domain = [[context activeUser] domain];
|
||||
um = [SOGoUserManager sharedUserManager];
|
||||
sourceIDs = [[um addressBookSourceIDsInDomain: domain] objectEnumerator];
|
||||
while ((currentSourceID = [sourceIDs nextObject]))
|
||||
currentUser = [context activeUser];
|
||||
if (activeUserIsOwner
|
||||
|| [[currentUser login]
|
||||
isEqualToString: [self ownerInContext: context]])
|
||||
{
|
||||
srcDisplayName = [um displayNameForSourceWithID: currentSourceID];
|
||||
currentFolder = [SOGoContactSourceFolder folderWithName: currentSourceID
|
||||
andDisplayName: srcDisplayName
|
||||
inContainer: self];
|
||||
[currentFolder setSource: [um sourceWithID: currentSourceID]];
|
||||
[subFolders setObject: currentFolder forKey: currentSourceID];
|
||||
domain = [currentUser domain];
|
||||
um = [SOGoUserManager sharedUserManager];
|
||||
sourceIDs = [[um addressBookSourceIDsInDomain: domain] objectEnumerator];
|
||||
while ((currentSourceID = [sourceIDs nextObject]))
|
||||
{
|
||||
srcDisplayName = [um displayNameForSourceWithID: currentSourceID];
|
||||
currentFolder = [SOGoContactSourceFolder folderWithName: currentSourceID
|
||||
andDisplayName: srcDisplayName
|
||||
inContainer: self];
|
||||
[currentFolder setSource: [um sourceWithID: currentSourceID]];
|
||||
[subFolders setObject: currentFolder forKey: currentSourceID];
|
||||
}
|
||||
}
|
||||
|
||||
return nil;
|
||||
|
||||
Reference in New Issue
Block a user