Skip to content

Ability to distinguish if user is Gitlab employee

Aishwarya Subramanian requested to merge gitlab-employee-check into master

What does this MR do?

This MR adds ability to determine whether a user is a gitlab employee or not.

Why is this needed?

As part of #207118 (closed), if a user is a GitLab employee, a badge indicating this detail will be shown alongside the user's name in comments.

Since user details in comments is pulled up from the discussion api, this MR returns is_gitlab_employee as true if the author of the comment is a GitLab employee.

The attribute is behind the FF: gitlab_employee_badge

Benchmarking:

On performing a benchmark assessment on the API::Entities::UserBasic entity, querying with and without the addition of is_gitlab_employee attribute, it appears that with the addition, the result is 1.02x slower after the changes.

Screen_Shot_2020-03-12_at_2.32.33_PM

Closes #209327 (closed)

Screenshots

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 Aishwarya Subramanian

Merge request reports