Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gutyán Gábor
/
circlestack
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
b83e5628
authored
Aug 09, 2016
by
Kálmán Viktor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: handle not existing profiles in 2fa
profile is created after 1st login
parent
509c7ce7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
circle/dashboard/views/user.py
+2
-2
No files found.
circle/dashboard/views/user.py
View file @
b83e5628
...
...
@@ -111,7 +111,7 @@ class CircleLoginView(LoginView):
def
form_valid
(
self
,
form
):
user
=
form
.
get_user
()
if
user
.
profile
.
two_factor_secret
:
if
hasattr
(
user
,
"profile"
)
and
user
.
profile
.
two_factor_secret
:
self
.
request
.
session
[
'two-fa-user'
]
=
user
.
pk
self
.
request
.
session
[
'two-fa-redirect'
]
=
self
.
get_success_url
()
self
.
request
.
session
[
'login-type'
]
=
"password"
...
...
@@ -719,7 +719,7 @@ if hasattr(settings, 'SAML_ORG_ID_ATTRIBUTE'):
relay_state
=
settings
.
LOGIN_REDIRECT_URL
logger
.
debug
(
'Redirecting to the RelayState: '
+
relay_state
)
if
user
.
profile
.
two_factor_secret
:
if
hasattr
(
user
,
"profile"
)
and
user
.
profile
.
two_factor_secret
:
request
.
session
[
'two-fa-user'
]
=
user
.
pk
request
.
session
[
'two-fa-redirect'
]
=
relay_state
request
.
session
[
'login-type'
]
=
"saml2"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment