Skip to content
Snippets Groups Projects
Commit bc093712 authored by Ben Adida's avatar Ben Adida
Browse files

auth systems should always be present, even if not enabled, otherwise emails can fail

parent 242719f9
Branches
No related tags found
No related merge requests found
from django.conf import settings from django.conf import settings
from . import password, twitter, linkedin, cas, facebook, google, yahoo, clever
_enabled = settings.AUTH_ENABLED_SYSTEMS or None
def _is_enabled(system):
return _enabled is None or system in _enabled
AUTH_SYSTEMS = {} AUTH_SYSTEMS = {}
if _is_enabled('twitter'): AUTH_SYSTEMS['password'] = password
from . import twitter AUTH_SYSTEMS['twitter'] = twitter
AUTH_SYSTEMS['twitter'] = twitter AUTH_SYSTEMS['linkedin'] = linkedin
AUTH_SYSTEMS['cas'] = cas
if _is_enabled('linkedin'): AUTH_SYSTEMS['facebook'] = facebook
from . import linkedin AUTH_SYSTEMS['google'] = google
AUTH_SYSTEMS['linkedin'] = linkedin AUTH_SYSTEMS['yahoo'] = yahoo
AUTH_SYSTEMS['clever'] = clever
if _is_enabled('password'):
from . import password
AUTH_SYSTEMS['password'] = password
if _is_enabled('cas'):
from . import cas
AUTH_SYSTEMS['cas'] = cas
if _is_enabled('facebook'):
from . import facebook
AUTH_SYSTEMS['facebook'] = facebook
if _is_enabled('google'):
from . import google
AUTH_SYSTEMS['google'] = google
if _is_enabled('yahoo'):
from . import yahoo
AUTH_SYSTEMS['yahoo'] = yahoo
if _is_enabled('clever'):
from . import clever
AUTH_SYSTEMS['clever'] = clever
# not ready # not ready
#import live #import live
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment