From dc96dd71fbd561e1143ad1262046cc9dd7924da9 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Mon, 5 Nov 2007 19:13:00 +0000 Subject: [PATCH] Monotone-Parent: 0d3cf6e6df797aaeaebcf6b6b99f0d547f5a6c9d Monotone-Revision: c44b382e05fae54797514e515e98878442841235 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-11-05T19:13:00 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 5 +++++ UI/Common/UIxObjectActions.m | 16 ++++++++++++++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 15a5fba56..d632805b6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2007-11-05 Wolfgang Sourdeau + * UI/Common/UIxObjectActions.m ([UIxObjectActions +initialize]): + read "SOGoACLsSendEMailNotifications" from the user defaults to + determiner whether to send an email when a user is added or + removed from an object's acl. + * SoObjects/Mailer/SOGoMailObject+Draft.m ([SOGoMailObject -contentForEditing]): make sure the htmlContent flag is set to NO when we select the textual part. Also we select only the relevant diff --git a/UI/Common/UIxObjectActions.m b/UI/Common/UIxObjectActions.m index fd9c3d3cb..d36ebc32d 100644 --- a/UI/Common/UIxObjectActions.m +++ b/UI/Common/UIxObjectActions.m @@ -31,8 +31,18 @@ #import "UIxObjectActions.h" +static BOOL sendACLAdvisories = NO; + @implementation UIxObjectActions ++ (void) initialize +{ + NSUserDefaults *ud; + + ud = [NSUserDefaults standardUserDefaults]; + sendACLAdvistories = [ud boolForKey: @"SOGoACLsSendEMailNotifications"]; +} + - (WOResponse *) addUserInAclsAction { WOResponse *response; @@ -53,7 +63,8 @@ clientObject = [self clientObject]; [clientObject setRoles: [clientObject aclsForUser: uid] forUser: uid]; - [clientObject sendACLAdditionAdvisoryToUser: uid]; + if (sendACLAdvistories) + [clientObject sendACLAdditionAdvisoryToUser: uid]; code = 204; } } @@ -83,7 +94,8 @@ { co = [self clientObject]; [co removeAclsForUsers: [NSArray arrayWithObject: uid]]; - [co sendACLRemovalAdvisoryToUser: uid]; + if (sendACLAdvistories) + [co sendACLRemovalAdvisoryToUser: uid]; code = 204; } }