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
8a589bbc
Commit
8a589bbc
authored
Sep 04, 2012
by
benjaoming
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:benjaoming/django-wiki
parents
3a31f2ce
c7aa2e17
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
wiki/models/article.py
+2
-2
wiki/models/urlpath.py
+2
-0
No files found.
wiki/models/article.py
View file @
8a589bbc
...
...
@@ -57,7 +57,7 @@ class Article(models.Model):
if
user
==
self
.
owner
:
return
True
if
self
.
group_read
:
if
self
.
group
and
user
.
groups
.
filter
(
id
=
self
.
group
.
id
):
if
self
.
group
and
user
.
groups
.
filter
(
id
=
self
.
group
.
id
)
.
exists
()
:
return
True
if
self
.
can_moderate
(
user
):
return
True
...
...
@@ -74,7 +74,7 @@ class Article(models.Model):
if
user
==
self
.
owner
:
return
True
if
self
.
group_write
:
if
self
.
group
and
user
and
user
.
groups
.
filter
(
id
=
self
.
group
.
id
):
if
self
.
group
and
user
and
user
.
groups
.
filter
(
id
=
self
.
group
.
id
)
.
exists
()
:
return
True
if
self
.
can_moderate
(
user
):
return
True
...
...
wiki/models/urlpath.py
View file @
8a589bbc
...
...
@@ -60,6 +60,8 @@ class URLPath(MPTTModel):
If the cached ancestors were not set explicitly, they will be retrieved from
the database.
"""
if
not
self
.
get_ancestors
()
.
exists
():
self
.
_cached_ancestors
=
[]
if
not
hasattr
(
self
,
"_cached_ancestors"
):
self
.
_cached_ancestors
=
list
(
self
.
get_ancestors
()
.
select_related_common
()
)
...
...
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