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

Information

Review Board
release-5.0.x

Reviewers

Currently there is no efficient way to query for comments that are
accessible by a given user when using <AnyCommentClass>.objects. This change
creates a CommentManager 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.

Commits

Files