From bfb3c167f055bee336942c9d969bd20eede7c6e5 Mon Sep 17 00:00:00 2001 From: wolfgang Date: Mon, 5 Nov 2007 19:18:58 +0000 Subject: [PATCH] git-svn-id: http://svn.opengroupware.org/SOGo/inverse/trunk@1236 d1b88da0-ebda-0310-925b-ed51d893ca5b --- ChangeLog | 5 +++++ SoObjects/SOGo/LDAPUserManager.m | 5 +---- UI/Common/UIxObjectActions.m | 16 ++++++++++++++-- 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 15a5fba5..d632805b 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/SoObjects/SOGo/LDAPUserManager.m b/SoObjects/SOGo/LDAPUserManager.m index 76e18108..be9ed79d 100644 --- a/SoObjects/SOGo/LDAPUserManager.m +++ b/SoObjects/SOGo/LDAPUserManager.m @@ -347,10 +347,7 @@ static NSString *defaultMailDomain = nil; // If our LDAP queries gave us nothing, we add at least one default // email address based on the default domain. - if ([emails count] == 0) - { - [self _fillContactMailRecords: currentUser]; - } + [self _fillContactMailRecords: currentUser]; } - (void) _retainUser: (NSDictionary *) newUser diff --git a/UI/Common/UIxObjectActions.m b/UI/Common/UIxObjectActions.m index fd9c3d3c..d36ebc32 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; } } -- 2.39.5