Skip to content

Set organization for GitLab employees as GitLab

What does this MR do?

Related to #212461 (closed)

Important! The callback User#set_organization_for_gitlab_employee will only work after the feature flag gitlab_employee_badge is taken off of the User#gitlab_employee? method or the feature is always enabled. If the feature flag is disabled, we cannot rely on this callback.

For database review

SQL query:

SELECT
    "users".*
FROM
    "users"
WHERE (email LIKE '%@gitlab.com')
    AND (organization != 'GitLab'
        OR organization IS NULL)
    AND "users"."confirmed_at" IS NOT NULL

When trying to run explain SELECT "users".* FROM "users" WHERE (email LIKE '%@gitlab.com') AND (organization != 'GitLab' OR organization IS NULL) AND "users"."confirmed_at" IS NOT NULL in #database-lab channel, I'm getting an error ERROR: failed to run explain without execution: pq: syntax error at or near "<". I can't spot what is the problem myself.

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 Mayra Cabrera

Merge request reports

Loading