Redirect single-result admin user searches to the edit page #1010
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#1010
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/userssearch should reduce unnecessary navigation when exactly one matching account exists.The existing admin user flow is defined in the web routes and must retain its current authorization and mutation protections.
Scope
/admin/userssearch handling inroutes/web.phpand its existing controller/view implementation to redirect exactly one match to that user’s edit page.Acceptance Criteria
Test Coverage Required
/admin/userssearch endpoint.Progress Checklist
/admin/userssearch route, handler, results query, and edit route.Go Directly to Edit User Page If Only One Matchto Redirect single-result admin user searches to the edit pageImplemented and merged in PR #1018 (master merge commit
8bf3c4a2).Nonblank admin user searches now redirect to the existing account edit route when the total match count is exactly one. Zero and multiple matches retain the results view, including pagination. Numeric searches still combine exact account IDs with username substring matches; an exact ID does not override additional matches. Blank searches remain unfiltered lists. Sole matches also redirect when the requested results page is out of range.
Archived/banned accounts remain searchable. Existing role middleware, edit-page policy checks, validation, and mutation rate limiters are preserved; editors still cannot edit higher-privilege accounts. No route, schema, dependency, or frontend asset changes were needed.
Verification: 41 focused feature tests passed with 249 assertions; Pint, PHPStan, and diff checks passed. All four progress checklist items are complete. Development and production deployment will follow this closeout.
Deployment completed to development and production for merged PR #1018 (
8bf3c4a2). Both release manifests now end in+pr1018-8bf3c4a2, and the deployed UserController checksum matches the merged source on both hosts.The deployment changed only
app/Http/Controllers/Admin/UserController.php, verified the previous file checksum before applying it, retained rollback copies of the controller and release manifest, restarted queues, and gracefully reloaded PHP-FPM. No migrations, dependency changes, or frontend rebuilds were required.Rollback backups:
/home/mvgldev/deploy-backups/pr1018-8bf3c4a2-8h90o7h0/home/mvgl/deploy-backups/pr1018-8bf3c4a2-xf87c4l4HTTPS checks passed for home, login, and guest admin-search requests on both environments; admin search redirected to login as expected. Production rejected the default Python HTTP user agent with 403; the established deployment browser user agent passed all checks. Authenticated result-count behavior is covered by the 41 focused feature tests (249 assertions); no live accounts or domain data were modified during verification.