Skip to content

Add "GitLab Team Member" badge to Issues/MRs/Epics list view and headers

What does this MR do?

See #212259 (closed)

Adds "GitLab Team Member" badge to Issues, MRs, and Epics created by a user with a @gitlab.com email. Badge added to the list view for all three, and header for Issues and MRs (see here !28359 (merged) for Epic header).

Screenshots

Page Before After
Issue List Screen_Shot_2020-03-29_at_5.10.28_PM Screen_Shot_2020-04-01_at_12.41.14_PM
MR List Screen_Shot_2020-03-29_at_5.10.48_PM Screen_Shot_2020-04-01_at_12.41.40_PM
Epic List Screen_Shot_2020-03-29_at_5.11.17_PM Screen_Shot_2020-04-01_at_12.42.12_PM
Issue Screen_Shot_2020-03-29_at_5.12.21_PM Screen_Shot_2020-04-01_at_12.42.54_PM
MR Screen_Shot_2020-03-29_at_5.13.02_PM Screen_Shot_2020-04-01_at_12.43.32_PM

Local Testing

  1. Enable :gitlab_employee_badge feature flag.
    • bin/rails console
    • Feature.enable(:gitlab_employee_badge)
  2. In lib/gitlab.rb change self.com? to return true
  3. Create a user with a @gitlab.com email address
  4. Navigate to a project, create an Issue and MR
  5. Install an EE license. See https://about.gitlab.com/handbook/developer-onboarding/#working-on-gitlab-ee.
  6. Navigate to a Group and create an Epic

Note: You may need to run gdk restart because of the caching on app/models/user.rb

Related MRs

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 Peter Hegman

Merge request reports