Anonymous avatar Anonymous committed 146fd1d Merge

Automated merge with ssh://

Comments (0)

Files changed (3)


         user = None
         cookie_name = app.cfg['session_cookie_name']
         session = SecureCookie.load_cookie(self, cookie_name,
-                                           app.cfg['secret_key'])
+                                           app.cfg['secret_key']
+                                              .encode('utf-8'))
         user_id = session.get('uid')
         if user_id:
             user = User.query.options(db.eagerload('groups'),
         return self.visible_for_user(request.user)
+    def visible_children(self):
+        """Only the children that are visible for the current user."""
+        return [x for x in self.children if x.visible]
+    @property
     def blocked(self):
         """This is true if the status is anything but moderated."""
         return self.status != COMMENT_MODERATED


     {%- for comment in post.visible_root_comments recursive %}
       <li class="comment">
         {{ render_comment(comment, post.comments_enabled) }}
-        {%- if comment.children %}
-          <ul class="sub_comments">{{ loop(comment.children) }}</ul>
+        {%- if comment.visible_children %}
+          <ul class="sub_comments">{{ loop(comment.visible_children) }}</ul>
         {%- endif %}
     {%- else %}
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.