mirror of
https://github.com/kakwa/ldapcherry
synced 2024-11-22 09:24:21 +01:00
fixing log errors in auth "none" mode
replacing None by unknown as a default value in order to avoid error in generating log msg because None is not a string
This commit is contained in:
parent
a802ce772a
commit
e4effc64ec
@ -677,7 +677,7 @@ class LdapCherry(object):
|
|||||||
key = self.attributes.get_key()
|
key = self.attributes.get_key()
|
||||||
username = params['attrs'][key]
|
username = params['attrs'][key]
|
||||||
sess = cherrypy.session
|
sess = cherrypy.session
|
||||||
admin = sess.get(SESSION_KEY, None)
|
admin = sess.get(SESSION_KEY, 'unknown')
|
||||||
|
|
||||||
cherrypy.log.error(
|
cherrypy.log.error(
|
||||||
msg="user '" + username + "' added by '" + admin + "'",
|
msg="user '" + username + "' added by '" + admin + "'",
|
||||||
@ -774,7 +774,7 @@ class LdapCherry(object):
|
|||||||
)
|
)
|
||||||
|
|
||||||
sess = cherrypy.session
|
sess = cherrypy.session
|
||||||
admin = sess.get(SESSION_KEY, None)
|
admin = sess.get(SESSION_KEY, 'unknown')
|
||||||
|
|
||||||
cherrypy.log.error(
|
cherrypy.log.error(
|
||||||
msg="user '" + username + "' modified by '" + admin + "'",
|
msg="user '" + username + "' modified by '" + admin + "'",
|
||||||
@ -860,7 +860,7 @@ class LdapCherry(object):
|
|||||||
|
|
||||||
def _deleteuser(self, username):
|
def _deleteuser(self, username):
|
||||||
sess = cherrypy.session
|
sess = cherrypy.session
|
||||||
admin = sess.get(SESSION_KEY, None)
|
admin = sess.get(SESSION_KEY, 'unknown')
|
||||||
|
|
||||||
for b in self.backends:
|
for b in self.backends:
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user