better error message for selfmodify if auth disabled

This commit is contained in:
kakwa 2015-07-05 23:09:32 +02:00
parent 1a37cb23a9
commit 7241b6f8ee
1 changed files with 4 additions and 1 deletions

View File

@ -881,7 +881,10 @@ class LdapCherry(object):
sess = cherrypy.session
user = str(sess.get(SESSION_KEY, None))
if self.auth_mode == 'none':
return "not available without authentication disabled"
return self.temp_error.render(is_admin=is_admin,
alert = 'warning',
message="Not accessible with authentication disabled."
)
if cherrypy.request.method.upper() == 'POST':
params = self._parse_params(params)
self._selfmodify(params)