Skip to content

Commit

Permalink
fix(calendar(js)): avoid call to /members when expansion is disabled
Browse files Browse the repository at this point in the history
Expose SOGoLDAPGroupExpansionEnabled in /jsonDefaults to avoid a call to
/members when the parameter is disabled.
  • Loading branch information
cgx committed Nov 18, 2019
1 parent 9c299cf commit 14b60cd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions UI/PreferencesUI/UIxJSONPreferences.m
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,10 @@ - (NSString *) jsonDefaults
[values setObject: [NSNumber numberWithBool: [domainDefaults appointmentSendEMailNotifications]]
forKey: @"SOGoAppointmentSendEMailNotifications"];

// Expose the SOGoLDAPGroupExpansionEnabled configuration parameter from the domain defaults
[values setObject: [NSNumber numberWithBool: [domainDefaults ldapGroupExpansionEnabled]]
forKey: @"SOGoLDAPGroupExpansionEnabled"];

// Add locale code (used by CK Editor)
[values setObject: [locale objectForKey: @"NSLocaleCode"] forKey: @"LocaleCode"];
[values setObject: [NSDictionary dictionaryWithObjectsAndKeys:
Expand Down
2 changes: 1 addition & 1 deletion UI/WebServerResources/js/Scheduler/Attendees.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@
if (!_.find(this.attendees, function(o) {
return o.email == attendee.email;
})) {
if (card.$isList()) {
if (card.$isList() && Attendees.$Preferences.defaults.SOGoLDAPGroupExpansionEnabled) {
// LDAP list -- preload members
card.$members().then(function(members) {
attendee.members = members;
Expand Down

0 comments on commit 14b60cd

Please sign in to comment.