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
8ed1a247
Commit
8ed1a247
authored
May 31, 2012
by
Calen Pennington
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Require login in order to switch to a different revision of wiki page history
parent
6f5bcb08
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
djangoapps/simplewiki/views.py
+3
-0
No files found.
djangoapps/simplewiki/views.py
View file @
8ed1a247
...
@@ -210,6 +210,9 @@ def history(request, wiki_url, page=1):
...
@@ -210,6 +210,9 @@ def history(request, wiki_url, page=1):
history
=
Revision
.
objects
.
filter
(
article__exact
=
article
)
.
order_by
(
'-counter'
)
.
select_related
(
'previous_revision__counter'
,
'revision_user'
,
'wiki_article'
)
history
=
Revision
.
objects
.
filter
(
article__exact
=
article
)
.
order_by
(
'-counter'
)
.
select_related
(
'previous_revision__counter'
,
'revision_user'
,
'wiki_article'
)
if
request
.
method
==
'POST'
:
if
request
.
method
==
'POST'
:
if
wiki_settings
.
WIKI_REQUIRE_LOGIN_EDIT
and
not
request
.
user
.
is_authenticated
():
return
HttpResponseRedirect
(
'/'
)
if
request
.
POST
.
__contains__
(
'revision'
):
#They selected a version, but they can be either deleting or changing the version
if
request
.
POST
.
__contains__
(
'revision'
):
#They selected a version, but they can be either deleting or changing the version
perm_err
=
check_permissions
(
request
,
article
,
check_write
=
True
,
check_locked
=
True
)
perm_err
=
check_permissions
(
request
,
article
,
check_write
=
True
,
check_locked
=
True
)
if
perm_err
:
if
perm_err
:
...
...
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