added logger for ldap user not in table
This commit is contained in:
@@ -175,7 +175,7 @@ logger.debug("Finished SQL query for LDAPUsers")
|
|||||||
for ldapUser in ldapUsers:
|
for ldapUser in ldapUsers:
|
||||||
# loop through the sql ldap users
|
# loop through the sql ldap users
|
||||||
for sqlUser in sqlLDAPusers:
|
for sqlUser in sqlLDAPusers:
|
||||||
# look to make sure the ldap user is in the table
|
# look to make sure the ldap user is in the table and then make sure they are active in Seafile
|
||||||
if ldapUser.mail in sqlUser:
|
if ldapUser.mail in sqlUser:
|
||||||
# are they active
|
# are they active
|
||||||
is_active = bool(sqlUser[4])
|
is_active = bool(sqlUser[4])
|
||||||
@@ -190,8 +190,11 @@ for ldapUser in ldapUsers:
|
|||||||
logger.info("User {0} was set to active in Seafile".format(ldapUser.mail))
|
logger.info("User {0} was set to active in Seafile".format(ldapUser.mail))
|
||||||
else:
|
else:
|
||||||
logger.error("There was an error setting user {0} to active in Seafile".format(ldapUser.mail))
|
logger.error("There was an error setting user {0} to active in Seafile".format(ldapUser.mail))
|
||||||
#else:
|
# user is not in the SQL table
|
||||||
|
else:
|
||||||
|
logger.debug("LDAP User {0} is NOT in the SQL Table".format(ldapUser.mail))
|
||||||
# add user to ldap table
|
# add user to ldap table
|
||||||
|
insert = ''
|
||||||
|
|
||||||
|
|
||||||
#seafileUsers = request('admin/search-user/?query=@johnhgaunt.com', seafileURL, seafileToken)['response']['user_list']
|
#seafileUsers = request('admin/search-user/?query=@johnhgaunt.com', seafileURL, seafileToken)['response']['user_list']
|
||||||
|
|||||||
Reference in New Issue
Block a user