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
835cc087
Commit
835cc087
authored
Jul 25, 2017
by
Clinton Blackburn
Committed by
Clinton Blackburn
Jul 27, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed usage of LogoutViewConfiguration
This model will soon be deleted. LEARNER-2042
parent
2d0fc911
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
3 additions
and
21 deletions
+3
-21
common/djangoapps/student/admin.py
+0
-2
common/djangoapps/student/models.py
+1
-1
common/djangoapps/student/tests/test_views.py
+1
-16
common/djangoapps/student/views.py
+1
-2
No files found.
common/djangoapps/student/admin.py
View file @
835cc087
...
...
@@ -15,7 +15,6 @@ from student.models import (
CourseEnrollmentAllowed
,
DashboardConfiguration
,
LinkedInAddToProfileConfiguration
,
LogoutViewConfiguration
,
PendingNameChange
,
Registration
,
RegistrationCookieConfiguration
,
...
...
@@ -203,7 +202,6 @@ admin.site.register(CourseEnrollmentAllowed)
admin
.
site
.
register
(
Registration
)
admin
.
site
.
register
(
PendingNameChange
)
admin
.
site
.
register
(
DashboardConfiguration
,
ConfigurationModelAdmin
)
admin
.
site
.
register
(
LogoutViewConfiguration
,
ConfigurationModelAdmin
)
admin
.
site
.
register
(
RegistrationCookieConfiguration
,
ConfigurationModelAdmin
)
...
...
common/djangoapps/student/models.py
View file @
835cc087
...
...
@@ -2469,7 +2469,7 @@ class UserAttribute(TimeStampedModel):
class
LogoutViewConfiguration
(
ConfigurationModel
):
""" Configuration for the logout view. """
"""
DEPRECATED:
Configuration for the logout view. """
def
__unicode__
(
self
):
"""Unicode representation of the instance. """
...
...
common/djangoapps/student/tests/test_views.py
View file @
835cc087
...
...
@@ -18,7 +18,7 @@ from pyquery import PyQuery as pq
from
student.cookies
import
get_user_info_cookie_data
from
student.helpers
import
DISABLE_UNENROLL_CERT_STATES
from
student.models
import
CourseEnrollment
,
LogoutViewConfiguration
,
UserProfile
from
student.models
import
CourseEnrollment
,
UserProfile
from
student.tests.factories
import
CourseEnrollmentFactory
,
UserFactory
from
xmodule.modulestore
import
ModuleStoreEnum
from
xmodule.modulestore.tests.django_utils
import
SharedModuleStoreTestCase
...
...
@@ -126,7 +126,6 @@ class LogoutTests(TestCase):
super
(
LogoutTests
,
self
)
.
setUp
()
self
.
user
=
UserFactory
()
self
.
client
.
login
(
username
=
self
.
user
.
username
,
password
=
PASSWORD
)
LogoutViewConfiguration
.
objects
.
create
(
enabled
=
True
)
def
create_oauth_client
(
self
):
""" Creates a trusted OAuth client. """
...
...
@@ -171,20 +170,6 @@ class LogoutTests(TestCase):
response
=
self
.
client
.
get
(
url
)
self
.
assertRedirects
(
response
,
'/courses'
,
fetch_redirect_response
=
False
)
def
test_switch_default
(
self
):
""" Verify the IDA logout functionality is disabled if the associated switch is disabled. """
LogoutViewConfiguration
.
objects
.
create
(
enabled
=
False
)
oauth_client
=
self
.
create_oauth_client
()
self
.
authenticate_with_oauth
(
oauth_client
)
self
.
assert_logout_redirects_to_root
()
def
test_switch_with_redirect_url
(
self
):
""" Verify the IDA logout functionality is disabled if the associated switch is disabled. """
LogoutViewConfiguration
.
objects
.
create
(
enabled
=
False
)
oauth_client
=
self
.
create_oauth_client
()
self
.
authenticate_with_oauth
(
oauth_client
)
self
.
assert_logout_redirects_with_target
()
def
test_without_session_value
(
self
):
""" Verify logout works even if the session does not contain an entry with
the authenticated OpenID Connect clients."""
...
...
common/djangoapps/student/views.py
View file @
835cc087
...
...
@@ -108,7 +108,6 @@ from student.models import (
DashboardConfiguration
,
LinkedInAddToProfileConfiguration
,
LoginFailures
,
LogoutViewConfiguration
,
ManualEnrollmentAudit
,
PasswordHistory
,
PendingEmailChange
,
...
...
@@ -2871,7 +2870,7 @@ class LogoutView(TemplateView):
logout
(
request
)
# If we don't need to deal with OIDC logouts, just redirect the user.
if
LogoutViewConfiguration
.
current
()
.
enabled
and
self
.
oauth_client_ids
:
if
self
.
oauth_client_ids
:
response
=
super
(
LogoutView
,
self
)
.
dispatch
(
request
,
*
args
,
**
kwargs
)
else
:
response
=
redirect
(
self
.
target
)
...
...
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