diff options
author | Rodney Ewing <ewing.rj@gmail.com> | 2013-06-11 14:30:38 -0700 |
---|---|---|
committer | Rodney Ewing <ewing.rj@gmail.com> | 2013-06-11 14:30:38 -0700 |
commit | 5101c469d71286f00e1094ee82e7e15d707f91e4 (patch) | |
tree | b6213cc58be712b46dbaee96d3e8743448389bc5 /mediagoblin/auth/tools.py | |
parent | dd8ef449e43ff199ac08db5741537b961e8db9f1 (diff) | |
download | mediagoblin-5101c469d71286f00e1094ee82e7e15d707f91e4.tar.lz mediagoblin-5101c469d71286f00e1094ee82e7e15d707f91e4.tar.xz mediagoblin-5101c469d71286f00e1094ee82e7e15d707f91e4.zip |
changed no_auth to authentication_disabled in config
Diffstat (limited to 'mediagoblin/auth/tools.py')
-rw-r--r-- | mediagoblin/auth/tools.py | 12 |
1 files changed, 6 insertions, 6 deletions
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() |