Skip to content

Allow new user registrations in `blocked pending approval` state

What does this MR do?

For #257878 (closed)

This MR introduces (behind a feature flag)

  • if the toggle in !43827 (merged) is turned on
    • new users created via the registration form are put in the blocked_pending_approval state.
    • they act like blocked users are not allowed to login (introduced in !44260 (merged))
    • upon successful signup, they are not automatically logged in, and an informative notice is shown.

Such a user has to be approved by the instance admin manually via the admin/users page (which moves them to the active state, marks their email as confirmed and also accepts their pending invitations, if any). This will be implemented in a separate MR.

Not adding a changelog since this is behind a feature flag.

Screenshots

Upon completing a signup (when the feature flag and the setting require_admin_approval_after_user_signup are on)

Screenshot_2020-10-06_at_10.53.29_AM

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Manoj M J

Merge request reports