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
// 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
#import "UIxObjectActions.h"
+static BOOL sendACLAdvisories = NO;
+
@implementation UIxObjectActions
++ (void) initialize
+{
+ NSUserDefaults *ud;
+
+ ud = [NSUserDefaults standardUserDefaults];
+ sendACLAdvistories = [ud boolForKey: @"SOGoACLsSendEMailNotifications"];
+}
+
- (WOResponse *) addUserInAclsAction
{
WOResponse *response;
clientObject = [self clientObject];
[clientObject setRoles: [clientObject aclsForUser: uid]
forUser: uid];
- [clientObject sendACLAdditionAdvisoryToUser: uid];
+ if (sendACLAdvistories)
+ [clientObject sendACLAdditionAdvisoryToUser: uid];
code = 204;
}
}
{
co = [self clientObject];
[co removeAclsForUsers: [NSArray arrayWithObject: uid]];
- [co sendACLRemovalAdvisoryToUser: uid];
+ if (sendACLAdvistories)
+ [co sendACLRemovalAdvisoryToUser: uid];
code = 204;
}
}