Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Helios Server
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TO
Helios Server
Commits
bc093712
Commit
bc093712
authored
4 years ago
by
Ben Adida
Browse files
Options
Downloads
Patches
Plain Diff
auth systems should always be present, even if not enabled, otherwise emails can fail
parent
242719f9
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
helios_auth/auth_systems/__init__.py
+9
-35
9 additions, 35 deletions
helios_auth/auth_systems/__init__.py
with
9 additions
and
35 deletions
helios_auth/auth_systems/__init__.py
+
9
−
35
View file @
bc093712
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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment