fix(core): decompose LDAP nested groups

pull/273/head
Francis Lachapelle 2020-08-17 16:03:29 -04:00
parent 21cb0cb985
commit 6aca61d8ae
1 changed files with 13 additions and 4 deletions

View File

@ -2031,9 +2031,9 @@ _makeLDAPChanges (NGLdapConnection *ldapConnection,
NSMutableArray *dns, *uids, *logins;
NSString *dn, *login;
SOGoUserManager *um;
NSDictionary *d;
NSDictionary *d, *contactInfos;
SOGoUser *user;
NSArray *o;
NSArray *o, *users;
NSAutoreleasePool *pool;
int i, c;
NGLdapEntry *entry;
@ -2098,8 +2098,17 @@ _makeLDAPChanges (NGLdapConnection *ldapConnection,
user = [SOGoUser userWithLogin: login roles: nil];
if (user)
{
[logins addObject: login];
[members addObject: user];
contactInfos = [self lookupContactEntryWithUIDorEmail: login inDomain: nil];
if ([contactInfos objectForKey: @"isGroup"])
{
users = [self membersForGroupWithUID: login];
[members addObjectsFromArray: users];
}
else
{
[logins addObject: login];
[members addObject: user];
}
}
[pool release];
}