You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Show purchased subscription storage in the admin panel #6158
❌ This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.
Overview
Admins see one Disk space figure per user, which is the admin-granted disk_space alone. Disk space a user has purchased through Stripe is invisible across the whole admin panel, so admins cannot tell a granted quota from a bought one.
Complexity: Medium Target branch: hotfixes
Context
UserSubscription holds subscription_disk_space, stripe_subscription_status and current_period_end. User.get_effective_disk_space() adds the subscription space to disk_space when the subscription is active.
Three admin read paths report storage, and all three read disk_space alone: AdminUserViewSet.values (users table), the metadata action (user detail panel), and user_csv_fields / _build_csv_row (CSV export).
Purchased disk space should be a field of its own everywhere the admin panel reports storage, distinct from the admin-granted quota.
The detail panel should additionally carry the subscription's status and period end, so an admin can tell a live subscription from a lapsed one.
How to Get There
The admin panel is at /administration/, behind IsAdminUser.
Users table: /administration/#/users/
User detail panel: /administration/#/users/<userId>
CSV export: the Download CSV button on the users table, which calls admin_users_download_csv and requires at least one filter
A user with a subscription needs a UserSubscription row — either created through Stripe Checkout on Settings > Storage, or seeded directly.
Out of Scope
Editing purchased disk space from the admin panel — the new field is read-only, and the existing disk space edit dialog continues to edit disk_space only.
The quota enforcement fix.
The user-facing Settings > Storage page.
The Stripe checkout and webhook flows.
Creating a subscription from a payment entered manually in Stripe — follow-up issue.
Acceptance Criteria
General
The users table shows a Purchased disk space column, and the pre-existing column reads Granted disk space.
The Purchased disk space column header is not sortable.
The user detail panel shows purchased disk space, the subscription status as display text rather than the raw Stripe value, and the period end labelled "Renews on" when cancel_at_period_end is false and "Expires on" when it is true.
The detail panel's "X of Y" line and its progress bar use granted + purchased as the denominator.
The CSV export has one column each for purchased disk space, subscription status, and period end.
A user with no subscription renders KEmptyPlaceholder in both admin views and empty cells in the CSV.
Testing
Python tests cover the list endpoint, the metadata action and the CSV row builder, for an active subscription, a canceled subscription, and no subscription.
Jest tests cover the new table column and the new detail panel fields.
AI usage
I found this while investigating a subscriber's failed uploads and used Claude Code to trace the admin read paths and draft the issue section by section. I chose which surfaces to cover, the field labels and the out-of-scope boundary, and decided against sorting the new column.
❌ This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.
Overview
Admins see one Disk space figure per user, which is the admin-granted
disk_spacealone. Disk space a user has purchased through Stripe is invisible across the whole admin panel, so admins cannot tell a granted quota from a bought one.Complexity: Medium
Target branch: hotfixes
Context
UserSubscriptionholdssubscription_disk_space,stripe_subscription_statusandcurrent_period_end.User.get_effective_disk_space()adds the subscription space todisk_spacewhen the subscription is active.disk_spacealone:AdminUserViewSet.values(users table), themetadataaction (user detail panel), anduser_csv_fields/_build_csv_row(CSV export).The Change
How to Get There
The admin panel is at
/administration/, behindIsAdminUser./administration/#/users//administration/#/users/<userId>admin_users_download_csvand requires at least one filterA user with a subscription needs a
UserSubscriptionrow — either created through Stripe Checkout on Settings > Storage, or seeded directly.Out of Scope
disk_spaceonly.Acceptance Criteria
General
cancel_at_period_endis false and "Expires on" when it is true.KEmptyPlaceholderin both admin views and empty cells in the CSV.Testing
metadataaction and the CSV row builder, for an active subscription, a canceled subscription, and no subscription.AI usage
I found this while investigating a subscriber's failed uploads and used Claude Code to trace the admin read paths and draft the issue section by section. I chose which surfaces to cover, the field labels and the out-of-scope boundary, and decided against sorting the new column.