#NEWLINE# @ collect_auth #NEWLINE# def project_tag( tag , auth , **kwargs ) : #NEWLINE# #INDENT# tag_obj = Tag . load ( tag ) #NEWLINE# if tag_obj : #NEWLINE# #INDENT# nodes = Node . find ( Q ( 'tags' , 'eq' , tag_obj . _id ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# nodes = [ ] #NEWLINE# #UNINDENT# visible_nodes = [ obj for obj in nodes if obj . can_view ( auth ) ] #NEWLINE# return { #NEWLINE# #INDENT# 'nodes' : [ { #NEWLINE# #INDENT# 'title' : node . title , #NEWLINE# 'url' : node . url , #NEWLINE# #UNINDENT# } for node in visible_nodes ] , #NEWLINE# 'tag' : tag , #NEWLINE# #UNINDENT# }