Disallow users from saying "Ship It!" to their own review requests.

Review Request #14198 — Created Oct. 11, 2024 and updated — Latest diff uploaded

Information

Review Board
release-7.x

Reviewers

We've always taken a pretty hands-off approach, preferring to encourage
conversation over policy. That said, one of the most requested bits of
policy is to make it so users can't mark their own review requests as
"Ship It". This is not only a reasonable policy ask (especially if
people are using approval workflows that can block pushes), but should
probably be the default.

This change implements that. The visibility of the "Ship It" action and
checkbox in the review dialog are now conditional on this flag, and
reviews will refuse to publish (either via the UI or API).

Because a big change like this may be controversial, I've added a toggle
for it in the admin settings, under a new page titled "Review Workflow".

  • Viewed a review request as both the owner and another user, and saw
    that the visibility of the action and review dialog checkbox was
    correct.
  • Toggled the setting in the admin and checked again, seeing that I
    could restore previous behavior.
  • Ran unit tests.

Commits

Files