Skip to content

Call RedisHllUserEvent only when a user is set

What does this MR do?

Fixes #331266 (closed)

We're calling the trackRedisHllUserEvent function from parts of the application where we can't guarantee a signed in user. The API however assumes that there is a user set and would respond with a 401 error.

As a solution, we now only pass events to the endpoint when a user is signed in.

This MR also fixes a potential false-positiv test by calling the function before checking if the mocked axios client gets called.

Screenshots (strongly suggested)

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

Does this MR contain changes to processing or storing of credentials or tokens, authorization and authentication methods or other items described in the security review guidelines? If not, then delete this Security section.

  • 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

Merge request reports