]> err.no Git - scalable-opengroupware.org/commitdiff
git-svn-id: http://svn.opengroupware.org/SOGo/inverse/trunk@1236 d1b88da0-ebda-0310...
authorwolfgang <wolfgang@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Mon, 5 Nov 2007 19:18:58 +0000 (19:18 +0000)
committerwolfgang <wolfgang@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Mon, 5 Nov 2007 19:18:58 +0000 (19:18 +0000)
ChangeLog
SoObjects/SOGo/LDAPUserManager.m
UI/Common/UIxObjectActions.m

index 15a5fba5689da12273515a4e30c524ae23f18bef..d632805b695f19ce3ae0927be52dd4c9200d4a57 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2007-11-05  Wolfgang Sourdeau  <wsourdeau@inverse.ca>
 
+       * 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
index 76e181088746c3b01379a473dd1e8e10fcfd54a8..be9ed79dcff309740b95c773952c384427a19e45 100644 (file)
@@ -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
index fd9c3d3cb3346039bf62db487254ffcdf47ab5dc..d36ebc32d49f09152b5d0728a6dd908ca63ef2fb 100644 (file)
 
 #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;
         }
     }