Skip to content

Registrations "by approval" mode

Alex Gleason requested to merge alexgleason/pleroma:by-approval into develop

Fixes #1931 (closed)

AdminFE MR: admin-fe!147 (merged)

Adds a "by approval" registration setting, so any user can request to sign up, but must be approved by the admin before they can sign in.

  • Add account_approval_required instance setting.
  • Add approval_pending field to User.
  • Return account_approval_required in /api/v1/instance for frontends.
  • Prevent unapproved users from logging in.
  • Put the user into approval_pending mode when registering while account_approval_required is on.
  • Receive the "reason" text in POST /api/v1/accounts and store it in the DB.
  • Test interaction of approval_pending and confirmation_pending on the user.
  • Email the admins when a new account is up for review.

Admin API:

  • Return registration_reason text with GET /api/pleroma/admin/users
  • Return approval_pending with GET /api/pleroma/admin/users
  • Allow filtering by need_approval in GET /api/pleroma/admin/users
  • Add PATCH /api/pleroma/admin/users/approve to batch approve unapproved users
Edited by Alex Gleason

Merge request reports