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
268b5b47
Commit
268b5b47
authored
Sep 20, 2013
by
Julian Arni
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove cache workaround
parent
7a8d4632
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
common/djangoapps/contentserver/middleware.py
+2
-3
No files found.
common/djangoapps/contentserver/middleware.py
View file @
268b5b47
...
@@ -22,8 +22,7 @@ class StaticContentServer(object):
...
@@ -22,8 +22,7 @@ class StaticContentServer(object):
return
response
return
response
# first look in our cache so we don't have to round-trip to the DB
# first look in our cache so we don't have to round-trip to the DB
#content = get_cached_content(loc)
content
=
get_cached_content
(
loc
)
content
=
None
if
content
is
None
:
if
content
is
None
:
# nope, not in cache, let's fetch from DB
# nope, not in cache, let's fetch from DB
try
:
try
:
...
@@ -47,7 +46,7 @@ class StaticContentServer(object):
...
@@ -47,7 +46,7 @@ class StaticContentServer(object):
# Check that user has access to content
# Check that user has access to content
if
getattr
(
content
,
"locked"
,
False
):
if
getattr
(
content
,
"locked"
,
False
):
if
not
hasattr
(
request
,
"user"
)
or
not
request
.
user
.
is_authenticated
():
if
not
hasattr
(
request
,
"user"
)
or
not
request
.
user
.
is_authenticated
():
return
redirect
(
'
root
'
)
return
redirect
(
'
login
'
)
course_id
=
"/"
.
join
([
loc
.
org
,
loc
.
course
,
loc
.
name
])
course_id
=
"/"
.
join
([
loc
.
org
,
loc
.
course
,
loc
.
name
])
if
not
CourseEnrollment
.
is_enrolled
(
request
.
user
,
course_id
):
if
not
CourseEnrollment
.
is_enrolled
(
request
.
user
,
course_id
):
return
redirect
(
'dashboard'
)
return
redirect
(
'dashboard'
)
...
...
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