Create CommentManager to query for comments that are accessible by a given user
Review Request #12309 — Created May 30, 2022 and submitted — Latest diff uploaded
Currently there is no efficient way to query for comments that are
accessible by a given user when using<AnyCommentClass>.objects
. This change
creates aCommentManager
and adds a method such that
<AnyCommentClass>.objects.accessible(user)
returns a queryset of comments that
are accessible by the given user.
- Wrote unit tests for
CommentManager
and they pass.
Diff Revision 11
This is not the most recent revision of the diff. The latest diff is revision 12. See what's changed.
orig
1
2
3
4
5
6
7
8
9
10
11
12
Commits
reviewboard/reviews/managers.py |
---|
reviewboard/reviews/models/base_comment.py |
---|
reviewboard/reviews/tests/test_comment_manager.py |
---|