Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
0847bc5e
Commit
0847bc5e
authored
Sep 04, 2013
by
Chris Dodge
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pep8/pylint violations fixes
parent
00710f75
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
6 deletions
+5
-6
common/djangoapps/external_auth/views.py
+4
-4
lms/envs/common.py
+1
-2
No files found.
common/djangoapps/external_auth/views.py
View file @
0847bc5e
...
@@ -392,7 +392,7 @@ def cas_login(request, next_page=None, required=False):
...
@@ -392,7 +392,7 @@ def cas_login(request, next_page=None, required=False):
Uses django_cas for authentication.
Uses django_cas for authentication.
CAS is a common authentcation method pioneered by Yale.
CAS is a common authentcation method pioneered by Yale.
See http://en.wikipedia.org/wiki/Central_Authentication_Service
See http://en.wikipedia.org/wiki/Central_Authentication_Service
Does normal CAS login then generates user_profile if nonexistent,
Does normal CAS login then generates user_profile if nonexistent,
and if login was successful. We assume that user details are
and if login was successful. We assume that user details are
maintained by the central service, and thus an empty user profile
maintained by the central service, and thus an empty user profile
...
@@ -400,12 +400,12 @@ def cas_login(request, next_page=None, required=False):
...
@@ -400,12 +400,12 @@ def cas_login(request, next_page=None, required=False):
"""
"""
ret
=
django_cas_login
(
request
,
next_page
,
required
)
ret
=
django_cas_login
(
request
,
next_page
,
required
)
if
request
.
user
.
is_authenticated
():
if
request
.
user
.
is_authenticated
():
user
=
request
.
user
user
=
request
.
user
if
not
UserProfile
.
objects
.
filter
(
user
=
user
):
if
not
UserProfile
.
objects
.
filter
(
user
=
user
):
u
p
=
UserProfile
(
name
=
user
.
username
,
user
=
user
)
u
ser_profile
=
UserProfile
(
name
=
user
.
username
,
user
=
user
)
u
p
.
save
()
u
ser_profile
.
save
()
return
ret
return
ret
...
...
lms/envs/common.py
View file @
0847bc5e
...
@@ -862,7 +862,6 @@ if MITX_FEATURES.get('AUTH_USE_CAS'):
...
@@ -862,7 +862,6 @@ if MITX_FEATURES.get('AUTH_USE_CAS'):
AUTHENTICATION_BACKENDS
=
(
AUTHENTICATION_BACKENDS
=
(
'django.contrib.auth.backends.ModelBackend'
,
'django.contrib.auth.backends.ModelBackend'
,
'django_cas.backends.CASBackend'
,
'django_cas.backends.CASBackend'
,
)
)
INSTALLED_APPS
+=
(
'django_cas'
,)
INSTALLED_APPS
+=
(
'django_cas'
,)
MIDDLEWARE_CLASSES
+=
(
'django_cas.middleware.CASMiddleware'
,)
MIDDLEWARE_CLASSES
+=
(
'django_cas.middleware.CASMiddleware'
,)
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