diff --git a/ChangeLog b/ChangeLog index 252b946c3..46cf4c2dc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-07-16 Francis Lachapelle + + * SoObjects/SOGo/SOGoObject.m ([SOGoObject -setOwner:]): update + ivar activeUserIsOwner when changing owner. + 2009-07-16 Cyril Robert * UI/PreferencesUI/UIxPreferences.m: Added categories, categoriesValue, diff --git a/SoObjects/SOGo/SOGoObject.m b/SoObjects/SOGo/SOGoObject.m index 27544ceb5..a5f5f6d5e 100644 --- a/SoObjects/SOGo/SOGoObject.m +++ b/SoObjects/SOGo/SOGoObject.m @@ -307,19 +307,18 @@ SEL SOGoSelectorForPropertySetter (NSString *property) - (void) setOwner: (NSString *) newOwner { + NSString *uid; + + uid = [[context activeUser] login]; + activeUserIsOwner = [newOwner isEqualToString: uid]; + ASSIGN (owner, newOwner); } - (NSString *) ownerInContext: (id) localContext { - NSString *uid; - if (!owner) - { - owner = [container ownerInContext: context]; - uid = [[localContext activeUser] login]; - activeUserIsOwner = [owner isEqualToString: uid]; - } + [self setOwner: [container ownerInContext: localContext]]; return owner; }