Skip to content

Commit

Permalink
Merge pull request #479 from sbabrass/master
Browse files Browse the repository at this point in the history
Fix permission check in ``kotti.views.util.nodes_tree``.
  • Loading branch information
disko committed Nov 11, 2015
2 parents b1ccbe0 + 270262f commit ba30611
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Change History
- Add Kotti logo and icon to static assets.
- Use Kotti logo as favicon.
- Move favicon definition to separate template to make it easily overridable.
- Fix permission check in ``kotti.views.util.nodes_tree``.

1.2.2 - 2015-10-28
------------------
Expand Down
2 changes: 1 addition & 1 deletion kotti/views/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ def nodes_tree(request, context=None, permission='view'):
item_to_children = defaultdict(lambda: [])
for node in DBSession.query(Content).with_polymorphic(Content):
item_mapping[node.id] = node
if has_permission('view', node, request):
if has_permission(permission, node, request):
item_to_children[node.parent_id].append(node)

for children in item_to_children.values():
Expand Down

0 comments on commit ba30611

Please sign in to comment.