diff --git a/seafile-ldap.py b/seafile-ldap.py index 8110d8a..660557a 100644 --- a/seafile-ldap.py +++ b/seafile-ldap.py @@ -230,20 +230,17 @@ for sqlLDAPuser in sqlLDAPusers: else: logger.error("There was an error setting user {0} to disabled in Seafile".format(sqlLDAPuser[1])) -exit() - - # get ad groups and import them into seafile # loop through each group and list members # compare members to users in seafile group # add users to group if missing and in the seafile group # remove members in not in group or seafile group # remove seafile groups if ad group is removed -ldap.search(config['LDAP SERVER']['groupBaseDN'], '(objectClass=group)', attributes=['*']) +ldap.search(ldapBase, '(objectClass=group)', attributes=['*']) #print(ldap.entries) for group in ldap.entries: try: if group.member: - logger.debug("{0}".format(group.name)) + logger.info("{0}".format(group.name)) finally: continue