1
0
mirror of https://github.com/kakwa/ldapcherry synced 2024-11-24 18:24:31 +01:00

better log on user deletion (adding deteled **by user**)

This commit is contained in:
kakwa 2015-11-03 08:54:17 +01:00
parent 4e5c361e5e
commit c71645ac99

View File

@ -786,6 +786,9 @@ class LdapCherry(object):
) )
def _deleteuser(self, username): def _deleteuser(self, username):
sess = cherrypy.session
admin = str(sess.get(SESSION_KEY, None))
for b in self.backends: for b in self.backends:
self.backends[b].del_user(username) self.backends[b].del_user(username)
cherrypy.log.error( cherrypy.log.error(
@ -794,7 +797,7 @@ class LdapCherry(object):
) )
cherrypy.log.error( cherrypy.log.error(
msg="User '" + username + "' deleted", msg="User '" + username + "' deleted by '" + admin + "'" ,
severity=logging.INFO severity=logging.INFO
) )