Add with_highest_role_minimal_access to statistics
What does this MR do and why?
- Adds
with_highest_role_minimal_access
column tousers_statistics
table - Shows statistics for users with minimal access in admin -> users statistics (only when the subscription is premium+)
Screenshots or screen recordings
before | after |
---|---|
How to set up and validate locally
- Checkout the branch
- Login as
root
- Navigate to admin -> dashboard -> users statistics (/admin/dashboard/stats)
Database up/down logs
> bundle exec rails db:migrate:up VERSION=20211103062728
== 20211103062728 AddWithHighestRoleMinimalAccessToUsersStatistics: migrating =
-- add_column(:users_statistics, :with_highest_role_minimal_access, :integer, {:null=>false, :default=>0})
-> 0.0047s
== 20211103062728 AddWithHighestRoleMinimalAccessToUsersStatistics: migrated (0.0048s)
> bundle exec rails db:migrate:down VERSION=20211103062728
== 20211103062728 AddWithHighestRoleMinimalAccessToUsersStatistics: reverting =
-- remove_column(:users_statistics, :with_highest_role_minimal_access, :integer, {:null=>false, :default=>0})
-> 0.0039s
== 20211103062728 AddWithHighestRoleMinimalAccessToUsersStatistics: reverted (0.0074s)
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #342516 (closed)
Edited by Ammar Alakkad