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
e2cc4731
Commit
e2cc4731
authored
Jan 22, 2014
by
Jason Bau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixes visibility of can_load for sneakpeek
parent
e9e6a776
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
lms/djangoapps/courseware/access.py
+3
-5
No files found.
lms/djangoapps/courseware/access.py
View file @
e2cc4731
...
...
@@ -288,9 +288,6 @@ def _has_access_descriptor(user, descriptor, action, course_context=None):
students to see modules. If not, views should check the course, so we
don't have to hit the enrollments table on every module load.
"""
# nonregistered users shouldn't be able to access certain descriptor types
if
not
UserProfile
.
has_registered
(
user
):
return
_can_load_descriptor_nonregistered
(
descriptor
)
# If start dates are off, can always load
if
settings
.
FEATURES
[
'DISABLE_START_DATES'
]
and
not
is_masquerading_as_student
(
user
):
...
...
@@ -306,9 +303,10 @@ def _has_access_descriptor(user, descriptor, action, course_context=None):
course_context
=
course_context
)
if
now
>
effective_start
:
# after start date, everyone can see it
# after start date, all registered users can see it
# nonregistered users shouldn't be able to access certain descriptor types
debug
(
"Allow: now > effective start date"
)
return
True
return
UserProfile
.
has_registered
(
user
)
or
_can_load_descriptor_nonregistered
(
descriptor
)
# otherwise, need staff access
return
_has_staff_access_to_descriptor
(
user
,
descriptor
,
course_context
)
...
...
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