feat(admin): bulk ownership transfer for plugins - #5
Merged
Conversation
Add a 'transfer' action to POST /api/admin/plugins/bulk that reassigns ownership of up to 100 plugins to a given user, validating the target user exists and recording previous owners in the audit log entry. Expose it in the admin plugins page as a Transfer button in the bulk selection bar, prompting for the new owner's user ID (same pattern as the bulk reject reason prompt). Localized in all six languages.
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
On narrow screens the bulk selection bar overflowed horizontally, cutting off buttons, and the per-plugin action icons squeezed the name/badges column down to nothing. Stack the bulk bar vertically below the sm breakpoint and let its buttons wrap. Let plugin rows wrap so the action icons drop to their own right-aligned line, keeping the name, badges and repo URL readable.
The header rendered all nav links inline at every width, so on phones the row overflowed and links were cut off, with no way to reach them. Below the md breakpoint the nav links and account actions now collapse into a hamburger-toggled dropdown under the header bar, closed automatically on navigation. Language and theme toggles stay in the bar. Desktop layout is unchanged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a Transfer action to the admin plugins bulk selection bar, so an admin can reassign ownership of all selected plugins to another user in one operation.
Until now the only way to force-transfer a plugin was a direct
PATCH /api/admin/plugins/:idcall withownerId— nothing in the UI exposed it.Changes
API
POST /api/admin/plugins/bulkaccepts a newtransferaction with a requiredownerIdfield.ownerIdis missing or doesn't match an existing user; nothing is modified in that case.plugin.bulk.transfer) records the new owner and afromOwnersmap of each plugin's previous owner.Frontend
/admin/plugins, next to Approve/Reject/Delete.admin_plugins_transfer,admin_plugins_bulk_transfer_prompt) translated in all six locales.Tests
admin-plugins-bulk.test.tscovering: successful multi-plugin transfer, missingownerId, unknown target user, and missing plugin ids reported inmissing.Notes
plugins.test.tsfails on a clean checkout in my environment (unrelated@tabularium/manifestresolution issue), so it's not a regression from this branch.Mobile layout
smbreakpoint and its buttons wrap instead of overflowing off-screen.mdbreakpoint (dropdown under the bar, auto-closed on navigation), instead of overflowing off-screen. Newnav_toggle_menumessage in all six locales.