Skip to content

Fix import project link on members page form

Jackie Fraser requested to merge fix_import_project_link_display into master

What does this MR do?

Removes the can_import_members? EE ability check from the check for whether to display the "Invite members" and "Invite a group" modal buttons.

No changelog because this is still behind the feature flag :invite_members_group_modal

Feature flag rollout issue: https://gitlab.com/gitlab-org/gitlab/-/issues/247208

Background

Currently, on the Members page, before the feature flag :invite_members_group_modal becomes enabled, the old Members page invite form uses can_import_members? _invite_member.html.haml#L27 to control the Import project feature and the "Import" link to it, but the form itself is displayed or not using admin_project_member permission:

This changes the invite members modal checks for displaying the Invite members and Invite a group modal buttons to behave the same way that the current Members page Invite member and Invite group tabs display.

The can_import_members? check being included in the default display check is causing issues when the EE member lock feature is in use: !60245 (merged).

This fix is also needed so that the can_import_members? can be correctly used to control displaying the equivalent "Import a project" button that replaces the "Import" button from the Haml: !60207 (merged)

with :invite_members_group_modal disabled with :invite_members_modal_enabled
import-invite with-modals

Related to !60245 (merged)

Related to !60207 (merged)

Related to https://gitlab.com/gitlab-org/gitlab/-/issues/247208

Screenshots (strongly suggested)

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 Jackie Fraser

Merge request reports

Loading