Skip to content

Allow block of admin user contribution mapping

James Nutt requested to merge jnutt/no-assigning-to-admins into master

What does this MR do and why?

Allow block of admin user contribution mapping

This MR introduces an application setting (disabled by default) which controls the ability to perform user contribution mapping to users with administrative privileges on the instance.

Related issue: #474963 (closed)

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Before After
CleanShot_2024-09-20_at_12.10.24_2x
CleanShot_2024-09-20_at_12.11.43_2x

How to set up and validate locally

  1. Enable Direct Transfer and local requests via your Rails console:
ApplicationSetting.first.update(
  allow_local_requests_from_web_hooks_and_services: true,
  bulk_import_enabled: true
)
  1. Enable user mapping for Direct Transfer:
Feature.enable(:importer_user_mapping)
Feature.enable(:bulk_import_importer_user_mapping)
  1. Import an existing group from your instance into another namespace.
  2. Enable the 'Allow contribution mapping to admins' setting in /admin/application_settings/general#js-import-export-settings.
  3. Navigate to the top-level group's members page, and attempt to reassign a contribution to an admin user.

CleanShot_2024-09-20_at_12.49.04_2x

Edited by James Nutt

Merge request reports

Loading