Warning when not allowed to edit files is not shown when the refactor_blob_viewer feature flag is enabled

There is a warning that appears when a user with minimal access to a project tries to edit a file. When the refactor_blob_viewer feature flag is enabled that warning isn't displayed.

This fails the QA test qa/specs/features/ee/browser_ui/1_manage/user/minimal_access_user_spec.rb and qa/specs/features/browser_ui/1_manage/user/user_access_termination_spec.rb.

Feature flag disabled (expected behavior) Feature flag enabled (incorrect behavior)
edit-fork-warning no-warning

To reproduce

  1. Add a user to a group with minimal access.
  2. Create a project in the group.
  3. Enable the refactor_blob_viewer feature flag.
  4. Sign in as the user with minimal access.
  5. Try to edit a file.
Edited by Mark Lapierre