Add note about status parsing during the node tree creation
This commit is contained in:
@@ -59,6 +59,8 @@ def jstree_get_children(node_id, project_id=None):
|
|||||||
try:
|
try:
|
||||||
children = Node.all(lookup, api=api)
|
children = Node.all(lookup, api=api)
|
||||||
for child in children['_items']:
|
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'
|
is_pub = child.properties.status == 'published'
|
||||||
if is_pub or (current_user.is_authenticated and child.user == current_user.objectid):
|
if is_pub or (current_user.is_authenticated and child.user == current_user.objectid):
|
||||||
children_list.append(jstree_parse_node(child))
|
children_list.append(jstree_parse_node(child))
|
||||||
|
Reference in New Issue
Block a user