Ask admins to confirm auto approval of pending users when settings are updated

Description

There are two admin settings that, when changed to certain values, can auto-approve the users in the Pending approval queue. This changing of settings may have the unintended consequence of adding more users than the admin is willing to have/pay for.

Those settings are:

Setting Screenshot Value that can auto-approve users in Pending approval queue
Require admin approval for new sign-ups Screenshot_2021-03-01_at_19.50.18 disabling it
User cap Screenshot_2021-03-01_at_19.50.30 Setting it to a value that is higher than the already approved users

We should have a modal informing admins that saving the settings will approve all users in the pending approval queue.

Proposed modal
image

Proposed flow

  1. Admin increases/removes the User cap setting or disables the Require admin approval checkbox
  2. Admin clicks save changes
  3. Admin sees the modal (regardless of whether or not there are users in the pending approval status)
  4. Admin clicks Approve users
    • Settings changes are saved
    • All users in the pending approval status are approved

Implementation tips

This is not a Vue place so we will most likely need some interaction HAML / Vue. We have some examples in the codebase of it when asking confirmation before deleting a group memeber).

Details

This is a follow-up proposal from #273258 (comment 453885739) where we introduced the auto approval of users in blocked_pending_approval status.

Edited by Andrei Stoicescu