From f2d9df8b61a4b055996d1ed3e86ec4a8ada1e899 Mon Sep 17 00:00:00 2001 From: Francesco Siddi Date: Fri, 25 Nov 2016 12:56:41 +0100 Subject: [PATCH] Add note about status parsing during the node tree creation --- pillar/web/utils/jstree.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pillar/web/utils/jstree.py b/pillar/web/utils/jstree.py index 3bd599f9..9c59700d 100644 --- a/pillar/web/utils/jstree.py +++ b/pillar/web/utils/jstree.py @@ -59,6 +59,8 @@ def jstree_get_children(node_id, project_id=None): try: children = Node.all(lookup, api=api) for child in children['_items']: + # TODO: allow nodes that don't have a status property to be visible + # in the node tree (for example blog) is_pub = child.properties.status == 'published' if is_pub or (current_user.is_authenticated and child.user == current_user.objectid): children_list.append(jstree_parse_node(child))