Skip to content

Add MINIMAL_ACCESS user statistics

Summary

As discussed in #342125 (closed), we currently have no visibility into the billing of MINIMAL_ACCESS members in the User Statistics

Although we include these members in our billable member counts (unless on Ultimate), they're not added to the statistics, e.g.

Screenshot_2021-10-06_at_14.53.20

So, given the following scenario:

Group A has 4 billable members:

  • 1 No project or group
  • 1 Minimal Access
  • 1 Guest
  • 1 Maintainer

Visiting their user stats, they'll see a billable total of 4, but only see a breakdown for 3.

Proposal

As confirmed here #342125 (comment 694781105), we should add this user level to the breakdown to add clarity and visibility for billable members.

  1. Add a new column to the user_statistics table for with_highest_role_minimal_access
  2. Update the UserStatistics model to include this new level
  3. Update the UI to display the count

Considerations

The MINIMAL_ACCESS role is only available in EE (Premium+) so we should consider conditionally displaying the statistics etc. based on that