Replace the admin user Banned select with a toggle #1012
Labels
No labels
automated
code-quality
component: admin dashboard
component: backend
component: billing
component: content management
component: faqs
component: game genres
component: game lists
component: game reviews
component: game search
component: games
component: internal notifications
component: platforms
component: security
component: tests
component: user api
component: user badges
component: user blogs
component: user consoles
component: user favorites
component: user friends
component: user notifications
component: user profiles
component: user site notifications
component: user wishlists
component: web design
dependencies
javascript
php
priority
high
priority
low
priority
medium
security-hotspot
source: codex
source: sonarqube
status
awaiting feedback
status
backlog
status
done
status
in progress
status
in queue
status
in review
status
needs codex review
status
needs investigation
status
wontfix
type: bug
type: documentation
type: feature
type: improvement
type: regression
type: task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MyVideoGameList/myvideogamelist.com#1012
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The admin user edit form should represent the existing boolean ban state with a direct on/off control.
The change must preserve both banning and unbanning behavior when the form is submitted.
Scope
Acceptance Criteria
Test Coverage Required
Progress Checklist
Change Account Banned Select Input Into Toggleto Replace the admin user Banned select with a toggleReplace the admin user edit form’s Banned select with a styled toggle.
A hidden N value makes unchecked submissions explicitly save the unbanned state, while checked submissions retain the existing Y value. The toggle preserves submitted state after validation errors and uses the existing controller, authorization, and ban behavior.
Verification: 72 feature tests passed (404 assertions), including toggle rendering, banning/unbanning, validation, admin authorization, profile fields, session invalidation, and Fider synchronization. Pint, PHPStan, frontend build, and diff checks passed.
Fixes #1012
Merged PR #1020 is deployed to development and production from master revision
ce26c706fb. Both release manifests end in +pr1020-ce26c706, and the deployed Blade template SHA-256 matches the merged source. Compiled Blade syntax checks and view-cache rebuilds passed; unrelated application files, assets, and configuration were checksum-guarded. No migrations, dependency changes, or account/domain-data writes were performed.The toggle submits Y when enabled and an explicit hidden N when disabled. Validation failures retain the submitted state. Existing authorization, validation, ban/session behavior, and unrelated account fields are preserved. Selecting the banned role still forces a ban, so clearing the toggle alone does not override that role; unbanning does not introduce account restoration or external-service reactivation.
Verification before merge: 72 feature tests passed with 404 assertions, plus Pint, PHPStan, the frontend build, and diff checks. Post-deployment HTTPS smoke checks passed for home/login on both sites, and unauthenticated admin edit requests redirect to login. No live accounts were banned or unbanned during deployment verification.
Rollback backups:
Each deployment account retains ~/deploy-staging/pr1020-ce26c706/deploy.py. Run it as the matching account with ~/bin on PATH and --rollback to restore the prior template/release manifest and rebuild the view cache.