Skip to content

Fixup Feature Flags Link in Search Bar Results

Jason Goodman requested to merge fix-search-bar-feature-flags into master

What does this MR do?

This MR makes a few small fixes related to the search bar widget:

  • Display the "In this project: Feature Flags" link in CE. This was only appearing in EE.
  • Do not display the "In this project: Feature Flags" link if the user does not have access to feature flags (if the user is a reporter). The link would appear even for reporters in EE, so the user would get a 404 when clicking the link.
  • Fix a bug where the "In this project: Feature Flags" link does not appear in EE when the user has access if the project repository permission settings are PRIVATE.
  • Refactor spec/features/search/user_uses_header_search_field_spec.rb to use let_it_be.
  • Refactor the js testing selector, .js-dashboard-search-options, to use a data-testid instead, data-testid=dashboard-search-options.
  • Fix a quarantined spec in spec/features/global_search_spec.rb.

Issue: #250352 (closed)

Also fixes: #201841 (closed)

Screenshots

A reporter does not see the "In this project: Feature Flags" link:

Screen_Shot_2020-10-21_at_12.46.19_PM

A developer sees the "In this project: Feature Flags" link:

Screen_Shot_2020-10-21_at_12.47.04_PM

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 Jason Goodman

Merge request reports