[Admin bypass] Skip confirmation when "allow bypass of placeholder user confirmation" is enabled
@ameyadarshan) to review the MRs that implement the confirmation skip to make sure we don't accidentally implement a loophole
Add logic to skip placeholder user reassignment confirmation when setting is enabled.
All of these three criteria must evaluate to true when checking if we should bypass:
- The instance is currently configured to allow user impersonation, and
- The bypass admin setting is enabled, and
- The user is an admin (use
User#can_admin_all_resources?, which works with admin mode)
Event tracking
Add an event for the action of admin reassigning contributions from placeholder to user without confirmation. See !182679 (merged) for how it's done.
Edited by Luke Duncalfe