From 5101c469d71286f00e1094ee82e7e15d707f91e4 Mon Sep 17 00:00:00 2001 From: Rodney Ewing Date: Tue, 11 Jun 2013 14:30:38 -0700 Subject: changed no_auth to authentication_disabled in config --- mediagoblin/auth/tools.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'mediagoblin/auth/tools.py') diff --git a/mediagoblin/auth/tools.py b/mediagoblin/auth/tools.py index ae0b79da..29b0ac76 100644 --- a/mediagoblin/auth/tools.py +++ b/mediagoblin/auth/tools.py @@ -180,21 +180,21 @@ def check_login_simple(username, password): class AuthError(Exception): def __init__(self): - self.value = 'No Authentication Plugin is enabled and no_auth = false'\ - ' in config!' + self.value = 'No Authentication Plugin is enabled and' \ + ' authentication_disabled = false in config!' def __str__(self): return repr(self.value) def check_auth_enabled(): - no_auth = mg_globals.app_config['no_auth'] + authentication_disabled = mg_globals.app_config['authentication_disabled'] auth_plugin = hook_handle('authentication') - if no_auth == 'false' and not auth_plugin: + if authentication_disabled == 'false' and not auth_plugin: raise AuthError - if no_auth == 'true' and not auth_plugin: + if authentication_disabled == 'true': _log.warning('No authentication is enabled') return False else: @@ -202,7 +202,7 @@ def check_auth_enabled(): def no_auth_logout(request): - """Log out the user if in no_auth mode, but don't delete the messages""" + """Log out the user if authentication_disabled, but don't delete the messages""" if not mg_globals.app.auth and 'user_id' in request.session: del request.session['user_id'] request.session.save() -- cgit v1.2.3