Skip to content

Commit

Permalink
[#1661] turn off OpenID by default. Deprecation warning if enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
joetsoi committed Apr 22, 2014
1 parent 78b6e6d commit 16e5586
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion ckan/config/middleware.py
Expand Up @@ -5,6 +5,7 @@
import json
import hashlib
import os
import warnings

import sqlalchemy as sa
from beaker.middleware import CacheMiddleware, SessionMiddleware
Expand Down Expand Up @@ -109,7 +110,8 @@ def make_app(conf, full_stack=True, static_files=True, **app_conf):
who_parser = WhoConfig(conf['here'])
who_parser.parse(open(app_conf['who.config_file']))

if asbool(config.get('openid_enabled', 'true')):
if asbool(config.get('openid_enabled', 'false')):
warnings.warn("OpenID auth is deprecated", DeprecationWarning)
from repoze.who.plugins.openid.identification import OpenIdIdentificationPlugin
# Monkey patches for repoze.who.openid
# Fixes #1659 - enable log-out when CKAN mounted at non-root URL
Expand Down
2 changes: 1 addition & 1 deletion ckan/lib/app_globals.py
Expand Up @@ -55,7 +55,7 @@
'ckan.plugins': {'type': 'split'},

# bool
'openid_enabled': {'default': 'true', 'type' : 'bool'},
'openid_enabled': {'default': 'false', 'type' : 'bool'},
'debug': {'default': 'false', 'type' : 'bool'},
'ckan.debug_supress_header' : {'default': 'false', 'type' : 'bool'},
'ckan.legacy_templates' : {'default': 'false', 'type' : 'bool'},
Expand Down
2 changes: 1 addition & 1 deletion ckan/logic/action/create.py
Expand Up @@ -817,7 +817,7 @@ def user_create(context, data_dict):
:type fullname: string
:param about: a description of the new user (optional)
:type about: string
:param openid: (optional)
:param openid: (optional, deprecated)
:type openid: string
:returns: the newly created yser
Expand Down

0 comments on commit 16e5586

Please sign in to comment.