Removed tight coupling of group membership expansion and LDAPSource.

Any implementation of SOGoSource may now support group expansion by implementing the protocol MembershipAwareSource.
This commit is contained in:
Johannes Kanefendt
2019-11-26 15:29:02 +01:00
parent 856b0654ab
commit 2e98929900
15 changed files with 255 additions and 569 deletions
@@ -47,7 +47,7 @@
#import <SOGo/NSObject+DAV.h>
#import <SOGo/NSString+Utilities.h>
#import <SOGo/SOGoDateFormatter.h>
#import <SOGo/SOGoGroup.h>
#import <SOGo/SOGoUserManager.h>
#import <SOGo/SOGoUser.h>
#import <SOGo/SOGoUserSettings.h>
#import <SOGo/SOGoDomainDefaults.h>
@@ -1670,10 +1670,13 @@ inRecurrenceExceptionsForEvent: (iCalEvent *) theEvent
if ([event isAttendee: [[delegate email] rfc822Email]])
ex = [NSException exceptionWithHTTPStatus: 409
reason: @"delegate is a participant"];
else if ([SOGoGroup groupWithEmail: [[delegate email] rfc822Email]
inDomain: [ownerUser domain]])
ex = [NSException exceptionWithHTTPStatus: 409
reason: @"delegate is a group"];
else {
NSDictionary *dict;
dict = [[SOGoUserManager sharedUserManager] contactInfosForUserWithUIDorEmail: [[delegate email] rfc822Email]];
if (dict && [[dict objectForKey: @"isGroup"] boolValue])
ex = [NSException exceptionWithHTTPStatus: 409
reason: @"delegate is a group"];
}
}
if (ex == nil)
{