Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
django-wiki
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
OpenEdx
django-wiki
Commits
473fd5ed
Commit
473fd5ed
authored
Aug 16, 2012
by
Bridger Maxwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added a permission denied page.
parent
3324ab02
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
6 deletions
+4
-6
wiki/decorators.py
+0
-2
wiki/templates/wiki/permission_denied.html
+4
-4
No files found.
wiki/decorators.py
View file @
473fd5ed
...
@@ -84,7 +84,6 @@ def get_article(func=None, can_read=True, can_write=False, deleted_contents=Fals
...
@@ -84,7 +84,6 @@ def get_article(func=None, can_read=True, can_write=False, deleted_contents=Fals
else
:
else
:
c
=
RequestContext
(
request
,
{
'urlpath'
:
urlpath
})
c
=
RequestContext
(
request
,
{
'urlpath'
:
urlpath
})
return
render_to_response
(
"wiki/permission_denied.html"
,
context_instance
=
c
)
return
render_to_response
(
"wiki/permission_denied.html"
,
context_instance
=
c
)
pass
if
can_write
and
not
article
.
can_write
(
request
.
user
):
if
can_write
and
not
article
.
can_write
(
request
.
user
):
if
request
.
user
.
is_anonymous
():
if
request
.
user
.
is_anonymous
():
...
@@ -92,7 +91,6 @@ def get_article(func=None, can_read=True, can_write=False, deleted_contents=Fals
...
@@ -92,7 +91,6 @@ def get_article(func=None, can_read=True, can_write=False, deleted_contents=Fals
else
:
else
:
c
=
RequestContext
(
request
,
{
'urlpath'
:
urlpath
})
c
=
RequestContext
(
request
,
{
'urlpath'
:
urlpath
})
return
render_to_response
(
"wiki/permission_denied.html"
,
context_instance
=
c
)
return
render_to_response
(
"wiki/permission_denied.html"
,
context_instance
=
c
)
pass
# If the article has been deleted, show a special page.
# If the article has been deleted, show a special page.
if
not
deleted_contents
and
article
.
current_revision
and
article
.
current_revision
.
deleted
:
if
not
deleted_contents
and
article
.
current_revision
and
article
.
current_revision
.
deleted
:
...
...
wiki/templates/wiki/permission_denied.html
View file @
473fd5ed
...
@@ -5,9 +5,9 @@
...
@@ -5,9 +5,9 @@
{% block pagetitle %}Permission Denied{% endblock %}
{% block pagetitle %}Permission Denied{% endblock %}
{% block wiki_contents %}
{% block wiki_contents %}
<div
class=
"alert denied"
>
<h1>
Permission Denied
</h2>
<h1>
Permission Denied
</h2>
<p>
Sorry, you don't have permission to view this page.
</p>
<p>
Sorry, you don't have permission to view this page.
</p>
</div>
{% endblock %}
{% endblock %}
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