See ChangeLog

Monotone-Parent: c6303bf32ace41498a75993116922dcd96cd4ad5
Monotone-Revision: 6b0d38e3817a056f1bb60d2484e9c2bc8bd02234

Monotone-Author: flachapelle@inverse.ca
Monotone-Date: 2009-07-27T21:36:03
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Francis Lachapelle
2009-07-27 21:36:03 +00:00
parent 919858a559
commit e7788ac76e
2 changed files with 26 additions and 13 deletions

View File

@@ -1,3 +1,10 @@
2009-07-27 Francis Lachapelle <flachapelle@inverse.ca>
* SoObjects/Appointments/SOGoAppointmentFolder.m
([SOGoAppointmentFolder
-roleForComponentsWithAccessClass:forUser:]): now returns an empty
string when user is owner of the calendar.
2009-07-23 Cyril Robert <crobert@inverse.ca>
* UI/Scheduler/UIxComponentEditor.m (repeatLabel), (ownerIsAttendee),

View File

@@ -2449,7 +2449,7 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir
- (NSString *) roleForComponentsWithAccessClass: (iCalAccessClass) accessClass
forUser: (NSString *) uid
{
NSString *accessRole, *prefix, *currentRole, *suffix;
NSString *accessRole, *ownerLogin, *prefix, *currentRole, *suffix;
NSEnumerator *acls;
NSMutableDictionary *userRoles;
@@ -2468,22 +2468,28 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir
userRoles = [NSMutableDictionary dictionaryWithCapacity: 3];
[aclMatrix setObject: userRoles forKey: uid];
}
accessRole = [userRoles objectForKey: prefix];
if (!accessRole)
{
acls = [[self aclsForUser: uid] objectEnumerator];
currentRole = [acls nextObject];
while (currentRole && !accessRole)
if ([currentRole hasPrefix: prefix])
{
suffix = [currentRole substringFromIndex: [prefix length]];
accessRole = [NSString stringWithFormat: @"Component%@", suffix];
}
else
currentRole = [acls nextObject];
if (!accessRole)
ownerLogin = [self ownerInContext: context];
if ([ownerLogin isEqualToString: uid])
accessRole = @"";
else
{
acls = [[self aclsForUser: uid] objectEnumerator];
currentRole = [acls nextObject];
while (currentRole && !accessRole)
if ([currentRole hasPrefix: prefix])
{
suffix = [currentRole substringFromIndex: [prefix length]];
accessRole = [NSString stringWithFormat: @"Component%@", suffix];
}
else
currentRole = [acls nextObject];
if (!accessRole)
accessRole = @"";
}
[userRoles setObject: accessRole forKey: prefix];
}