Address misleading "active" User scope
Background
While working on !42034 (merged), we found the active
scope for the User
model is a bit misleading. It includes a filter for the user state (to be "active"), as well as utilizing the non_internal
scope. It seems like the "active" scope should only involve the state filter and not involve other scopes for user types (non_internal
).
!42034 (merged)
Followup fromHere's an excerpt from the thread:
I totally agree the "active" scope is misleading because it includes users types and doesn't just involve state. Changing that scope could be a big undertaking as it's used quite a bit, but I think it's needed. Not sure I'll tackle that in this issue though.
😄 I'll create a follow-up issue.
Proposal
Investigate if it's worth adjusting this scope to only include the state filter. This has pretty big implications across the app as there are many places that reference this scope (Admin views, Historical Data, APIs that return active user counts). If there are places that do seem to require a scope that has these two elements combined, maybe we can introduce a new scope with a more meaningful name.