diff options
author | Rodney Ewing <ewing.rj@gmail.com> | 2013-06-15 12:32:20 -0700 |
---|---|---|
committer | Rodney Ewing <ewing.rj@gmail.com> | 2013-06-15 12:32:20 -0700 |
commit | 54ef2c408bdae8a7b827ce648567ae94573a99e3 (patch) | |
tree | 36ca249f47cc13564e154f2bd31c6e5f36808b4f /mediagoblin/auth/tools.py | |
parent | 5101c469d71286f00e1094ee82e7e15d707f91e4 (diff) | |
download | mediagoblin-54ef2c408bdae8a7b827ce648567ae94573a99e3.tar.lz mediagoblin-54ef2c408bdae8a7b827ce648567ae94573a99e3.tar.xz mediagoblin-54ef2c408bdae8a7b827ce648567ae94573a99e3.zip |
moved authentication_disabled to config_spec
Diffstat (limited to 'mediagoblin/auth/tools.py')
-rw-r--r-- | mediagoblin/auth/tools.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mediagoblin/auth/tools.py b/mediagoblin/auth/tools.py index 29b0ac76..f69d35ad 100644 --- a/mediagoblin/auth/tools.py +++ b/mediagoblin/auth/tools.py @@ -181,7 +181,7 @@ def check_login_simple(username, password): class AuthError(Exception): def __init__(self): self.value = 'No Authentication Plugin is enabled and' \ - ' authentication_disabled = false in config!' + ' authentication_disabled = False in config!' def __str__(self): return repr(self.value) @@ -191,10 +191,10 @@ def check_auth_enabled(): authentication_disabled = mg_globals.app_config['authentication_disabled'] auth_plugin = hook_handle('authentication') - if authentication_disabled == 'false' and not auth_plugin: + if authentication_disabled is False and not auth_plugin: raise AuthError - if authentication_disabled == 'true': + if authentication_disabled: _log.warning('No authentication is enabled') return False else: |