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
9de6e281
Commit
9de6e281
authored
Aug 03, 2012
by
ichuang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
limit course reload to localhost or user.is_staff
parent
10f53d62
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
4 deletions
+9
-4
lms/djangoapps/lms_migration/migrate.py
+8
-3
lms/envs/dev.py
+1
-1
No files found.
lms/djangoapps/lms_migration/migrate.py
View file @
9de6e281
...
...
@@ -38,11 +38,16 @@ def manage_modulestores(request,reload_dir=None):
if
LOCAL_DEBUG
:
html
+=
'<h3>IP address:
%
s '
%
ip
log
.
debug
(
'request from ip=
%
s'
%
ip
)
if
not
(
ip
in
ALLOWED_IPS
or
'any'
in
ALLOWED_IPS
):
html
+=
'Permission denied'
html
+=
"</body></html>"
return
HttpResponse
(
html
)
if
request
.
user
and
request
.
user
.
is_staff
:
log
.
debug
(
'request allowed because user=
%
s is staff'
%
request
.
user
)
else
:
html
+=
'Permission denied'
html
+=
"</body></html>"
log
.
debug
(
'request denied, ALLOWED_IPS=
%
s'
%
ALLOWED_IPS
)
return
HttpResponse
(
html
)
#----------------------------------------
# reload course if specified
...
...
lms/envs/dev.py
View file @
9de6e281
...
...
@@ -62,7 +62,7 @@ SECRET_KEY = '85920908f28904ed733fe576320db18cabd7b6cd'
MITX_FEATURES
[
'ENABLE_LMS_MIGRATION'
]
=
True
MITX_FEATURES
[
'ACCESS_REQUIRE_STAFF_FOR_COURSE'
]
=
True
LMS_MIGRATION_ALLOWED_IPS
=
[
'
any
'
]
LMS_MIGRATION_ALLOWED_IPS
=
[
'
127.0.0.1
'
]
################################ OpenID Auth #################################
MITX_FEATURES
[
'AUTH_USE_OPENID'
]
=
True
...
...
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