Skip to content

Add email column to "Seats in use" table

Andrei Stoicescu requested to merge as-email-column into master

What does this MR do?

Adds a new Email column to the Seats in use table.

The emails in the email column are only visible to a group owner who manages the user through Group Managed Accounts, as per our current policy. If this is not the case, instead of the actual email the text Private will be displayed, with a tooltip upon hover that says An email address is only visible for users managed through Group Managed Accounts.

This is the implementation MR for Issue #268265 (closed)

Showcase

Before After
Screenshot_2020-11-11_at_19.08.37 Screenshot_2020-11-11_at_19.05.11

Tooltip for private email addresses

Screen_Recording_2020-11-23_at_18.39.34

How to test

  1. Enable the feature flag api_billable_member_list
  2. Make sure a group has some billable seats. Go to that groups' Seat usage page, located at the seat_usage route (e.g. /groups/test-group-name/-/seat_usage)

In order to see the actual email addresses in lieu of the Private text, you need to set up users managed through Group Managed Accounts. This can be quite tedious. A shortcut for testing this locally can be made by editing the ee/lib/ee/api/entities/user_basic.rb file, and replacing this:

expose :email, if: -> (user, options) { user.managed_by?(options[:current_user]) }

with this:

expose :email

Does this MR meet the acceptance criteria?

Conformity

Edited by Andrei Stoicescu

Merge request reports

Loading