Ability to distinguish if user is Gitlab employee
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.
Closes #209327 (closed)
Screenshots
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
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