From 51e038be25c6a34ef0afc9f1d091ab5033753e78 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Wed, 21 Feb 2007 21:13:33 +0000 Subject: [PATCH] Monotone-Parent: 4de98a5963de39d905c4000d2e3f09025982cf78 Monotone-Revision: 00cc84ef315fcfd92c695f711ddee9a1e5bc76c6 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-02-21T21:13:33 Monotone-Branch: ca.inverse.sogo --- SoObjects/SOGo/SOGoUser.m | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/SoObjects/SOGo/SOGoUser.m b/SoObjects/SOGo/SOGoUser.m index 0c7a3947f..d3bb2eaac 100644 --- a/SoObjects/SOGo/SOGoUser.m +++ b/SoObjects/SOGo/SOGoUser.m @@ -151,9 +151,13 @@ NSArray *sogoRoles; NSString *role; - rolesForObject - = [NSMutableArray arrayWithArray: [super rolesForObject: object - inContext: context]]; + rolesForObject = [NSMutableArray new]; + [rolesForObject autorelease]; + + sogoRoles = [super rolesForObject: object inContext: context]; + if (sogoRoles) + [rolesForObject addObjectsFromArray: sogoRoles]; + if ([[object ownerInContext: context] isEqualToString: [self login]]) [rolesForObject addObject: SoRole_Owner]; if ([object isKindOfClass: [SOGoObject class]])