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; } }