Skip to content

Change how we export email for seat usage data

Krasimir Angelov requested to merge 262877-seat-usage-export-fix-email into master

What does this MR do?

Fixes a problem with the new Seat Usage export feature, noticed by @amandarueda while testing - https://gitlab.com/gitlab-org/gitlab/-/issues/337397#note_646853899.

In !67202 (diffs), where we implemented exporting seat usage data as CSV, I've tried the API endpoint behavior to expose only public emails by copy the logic from the UserBasic entity - https://gitlab.com/gitlab-org/gitlab/-/blob/80c745a3aa2c090ab7da666276db481efd4e7ad5/ee/lib/ee/api/entities/user_basic.rb#L11.

What I missed is that for the Seat Usage page we override this in the BillableMember entity - https://gitlab.com/gitlab-org/gitlab/-/blob/80c745a3aa2c090ab7da666276db481efd4e7ad5/ee/lib/ee/api/entities/billable_member.rb#L7, and use User#public_email instead.

This MR updates Groups::SeatUsageExportService to do the same.

Related to #262877 (closed).

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

Related to #262877 (closed)

Merge request reports

Loading