← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~jcsackett/launchpad/comment-display-rules into lp:launchpad

 

The proposal to merge lp:~jcsackett/launchpad/comment-display-rules into lp:launchpad has been updated.

Description changed to:

Summary
=======
Updates comment display rules for registry experts so they see invisible comments with the special styling that admins previously saw comments with. Without this branch, a registry expert can hide comments, but can't see them as admins can.

Preimplementation
=================
None

Implementation
==============
lib/lp/bugs/browser/bugcomment.py
---------------------------------
Updated the method that determines if the special css for showing invisible comments to admin/registry experts. Since the comments are now no longer returned if the user can't see them, this only checks if the message is meant to be invisible. If it is, but it's been returned, it needs to be styled specially since an admin or registry expert must be viewing it.

lib/lp/bugs/browser/bugtask.py
lib/lp/bugs/templates/bugtask-index.pt
------------------------------
Updated get_visible_comments to strip out comments that shouldn't be displayed b/c they're marked as invisible, rather than handling it in the template. The template now doesn't check for user's admin status or comments visible status.

lib/lp/bugs/browser/tests/test_bugcomment_visibility.py
-------------------------------------------------------
Tests.

Tests
=====
bin/test -vvct bugcomment_visibility

QA
==
Hide a comment using the API's setComentVisibility. As a random signed in user or not-logged in user, you shouldn't see the comment. As a registry expert or administrator you should see the comment, but it should be highlighted.

Lint
====
= Launchpad lint =

Checking for conflicts and issues in changed files.

Linting changed files:
  lib/lp/bugs/browser/bugcomment.py
  lib/lp/bugs/browser/bugtask.py
  lib/lp/bugs/browser/tests/test_bugcomment_visibility.py
  lib/lp/bugs/templates/bugtask-index.pt

./lib/lp/bugs/browser/bugtask.py
    3153: W291 trailing whitespace
    3153: Line has trailing whitespace.


For more details, see:
https://code.launchpad.net/~jcsackett/launchpad/comment-display-rules/+merge/58760
-- 
https://code.launchpad.net/~jcsackett/launchpad/comment-display-rules/+merge/58760
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~jcsackett/launchpad/comment-display-rules into lp:launchpad.


References