Monotone-Parent: d067eec2c3a6e9f8ecea3e4d6824f17f41a4af7a
Monotone-Revision: 8cbe30e65e9874e7812378f06bbda442c37788b4 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2010-04-09T20:17:03 Monotone-Branch: ca.inverse.sogomaint-2.0.2
parent
f7043478c7
commit
3dab983c97
|
@ -1,5 +1,9 @@
|
|||
2010-04-09 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* SoObjects/Mailer/SOGoMailFolder.m (-aclsForUser:): don't fetch
|
||||
ACL when the current user is not the mailbox owner. Also, we don't
|
||||
set default viewing roles when the uid is not the active user.
|
||||
|
||||
* SoObjects/SOGo/SOGoObject.m (-labelForKey:): restored method.
|
||||
|
||||
* SoObjects/Appointments/SOGoAptMailUpdate.m,
|
||||
|
|
|
@ -903,18 +903,14 @@ static NSString *defaultUserID = @"anyone";
|
|||
NSMutableArray *acls;
|
||||
SOGoMailAccount *mailAccount;
|
||||
NSString *path;
|
||||
// NSArray *names;
|
||||
// unsigned int count;
|
||||
|
||||
acls = [NSMutableArray array];
|
||||
|
||||
mailAccount = [self mailAccountFolder];
|
||||
path = [[self imap4Connection] imap4FolderNameForURL: [self imap4URL]];
|
||||
// names = [path componentsSeparatedByString: @"/"];
|
||||
// count = [names count];
|
||||
|
||||
if ([self _path: path
|
||||
isInNamespaces: [mailAccount sharedFolderNamespaces]]
|
||||
isInNamespaces: [mailAccount otherUsersFolderNamespaces]]
|
||||
|| [self _path: path
|
||||
isInNamespaces: [mailAccount sharedFolderNamespaces]])
|
||||
[acls addObject: SOGoRole_ObjectViewer];
|
||||
|
@ -927,20 +923,27 @@ static NSString *defaultUserID = @"anyone";
|
|||
- (NSArray *) aclsForUser: (NSString *) uid
|
||||
{
|
||||
NSMutableArray *acls;
|
||||
NSString *userAcls;
|
||||
NSString *userAcls, *userLogin;
|
||||
|
||||
acls = [self _sharesACLs];
|
||||
userLogin = [[context activeUser] login];
|
||||
if ([uid isEqualToString: userLogin])
|
||||
acls = [self _sharesACLs];
|
||||
else
|
||||
acls = [NSMutableArray array];
|
||||
|
||||
if (!mailboxACL)
|
||||
[self _readMailboxACL];
|
||||
|
||||
if ([mailboxACL isKindOfClass: [NSDictionary class]])
|
||||
if ([owner isEqualToString: userLogin])
|
||||
{
|
||||
userAcls = [mailboxACL objectForKey: uid];
|
||||
if (!([userAcls length] || [uid isEqualToString: defaultUserID]))
|
||||
userAcls = [mailboxACL objectForKey: defaultUserID];
|
||||
if ([userAcls length])
|
||||
[acls addObjectsFromArray: [self _imapAclsToSOGoAcls: userAcls]];
|
||||
if (!mailboxACL)
|
||||
[self _readMailboxACL];
|
||||
|
||||
if ([mailboxACL isKindOfClass: [NSDictionary class]])
|
||||
{
|
||||
userAcls = [mailboxACL objectForKey: uid];
|
||||
if (!([userAcls length] || [uid isEqualToString: defaultUserID]))
|
||||
userAcls = [mailboxACL objectForKey: defaultUserID];
|
||||
if ([userAcls length])
|
||||
[acls addObjectsFromArray: [self _imapAclsToSOGoAcls: userAcls]];
|
||||
}
|
||||
}
|
||||
|
||||
return acls;
|
||||
|
|
Loading…
Reference in New Issue