Improve publishing options after submitting as another user.
Review Request #9861 — Created April 9, 2018 and submitted — Latest diff uploaded
Review Board 3.0 began tracking which users made changes to review
requests, so that special users could modify a review request without
making it appear as if the changes came from the original owner, and to
allow changing the owner of a review request. This caused a regression
in the behavior for RBTools's--submit-as
, where the review request
would be created with the specified user but published with (and
notifications going out as) the logged in user.This change restores the original behavior. The initial publish of a
review request now always comes from the owner of the review request,
rather than the logged in user. Since--submit-as
only works for the
initial creation, this makes things work how they did in previous
releases.A new
publish_as_owner=1
option was also added when publishing drafts,
which forces this same logic on future updates. This will allow
automation scripts to update review requests fully on behalf of the
owner, which wasn't possible until now.Unit tests were added for these new changes.
All unit tests pass.
Manually posted to my server using
--submit-as=... --publish
. Saw that
the notifications went out as the correct user.Temporarily modified RBTools to set
publish_as_owner
. Posted with and
without it. Saw that the notifications were sent out as the correct user
in both cases.