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
1d4defd0
Commit
1d4defd0
authored
Mar 01, 2013
by
David Ormsbee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bug where we weren't combining org_staff with built-in staff for group checking
parent
bfe2809a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
lms/djangoapps/courseware/access.py
+3
-3
No files found.
lms/djangoapps/courseware/access.py
View file @
1d4defd0
...
@@ -382,7 +382,7 @@ def group_names_for(role, location, course_context=None):
...
@@ -382,7 +382,7 @@ def group_names_for(role, location, course_context=None):
group_name
=
'{0}_{1}'
.
format
(
role
,
course_id
)
group_name
=
'{0}_{1}'
.
format
(
role
,
course_id
)
return
group_name
,
legacy_group_name
return
[
group_name
,
legacy_group_name
]
group_names_for_staff
=
partial
(
group_names_for
,
'staff'
)
group_names_for_staff
=
partial
(
group_names_for
,
'staff'
)
group_names_for_instructor
=
partial
(
group_names_for
,
'instructor'
)
group_names_for_instructor
=
partial
(
group_names_for
,
'instructor'
)
...
@@ -552,7 +552,7 @@ def _has_access_to_location(user, location, access_level, course_context):
...
@@ -552,7 +552,7 @@ def _has_access_to_location(user, location, access_level, course_context):
if
access_level
==
'staff'
:
if
access_level
==
'staff'
:
staff_groups
=
group_names_for_staff
(
location
,
course_context
)
+
\
staff_groups
=
group_names_for_staff
(
location
,
course_context
)
+
\
_course_org_staff_group_name
(
location
,
course_context
)
[
_course_org_staff_group_name
(
location
,
course_context
)]
for
staff_group
in
staff_groups
:
for
staff_group
in
staff_groups
:
if
staff_group
in
user_groups
:
if
staff_group
in
user_groups
:
debug
(
"Allow: user in group
%
s"
,
staff_group
)
debug
(
"Allow: user in group
%
s"
,
staff_group
)
...
@@ -561,7 +561,7 @@ def _has_access_to_location(user, location, access_level, course_context):
...
@@ -561,7 +561,7 @@ def _has_access_to_location(user, location, access_level, course_context):
if
access_level
==
'instructor'
or
access_level
==
'staff'
:
# instructors get staff privileges
if
access_level
==
'instructor'
or
access_level
==
'staff'
:
# instructors get staff privileges
instructor_groups
=
group_names_for_instructor
(
location
,
course_context
)
+
\
instructor_groups
=
group_names_for_instructor
(
location
,
course_context
)
+
\
_course_org_instructor_group_name
(
location
,
course_context
)
[
_course_org_instructor_group_name
(
location
,
course_context
)]
for
instructor_group
in
instructor_groups
:
for
instructor_group
in
instructor_groups
:
if
instructor_group
in
user_groups
:
if
instructor_group
in
user_groups
:
debug
(
"Allow: user in group
%
s"
,
instructor_group
)
debug
(
"Allow: user in group
%
s"
,
instructor_group
)
...
...
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