PAR-11
A way for staff/DOC to force disband businesses/change other details in game
Admin commands for staff/DOC to manage businesses in-game: /firm admin disband, /firm admin rename, /firm admin set attribute, /firm admin set proprietor.
Technical notes — No business.admin.* firm command surface exists (only business.admin.reload). Service methods present: disbandFirm (proprietor-gated), updateProprietor(firmId, playerId) (internal, ungated), updateFirmHq/Discord (ADMIN-gated). Missing: rename — FirmMapper has create/update/archive but no name-change method. Add a FirmCommands @Route("admin …") group gated on a new business.admin.* perm that bypasses proprietor checks; reuse disbandFirm/updateProprietor, add a new renameFirm routed through NameValidator + uniqueness (like createFirm).
Resources
- commit7d7f8ed Add staff/DOC firm administration commands (PAR-11)MCCitiesNetwork/Business
- PR · merged#6 Release: develop → mainMCCitiesNetwork/Business
Comments
tesks · Jun 4, 2026, 9:56 AM
Code context — No business.admin.* firm command surface exists (only business.admin.reload). Service methods present: disbandFirm (proprietor-gated), updateProprietor(firmId, playerId) (internal, ungated — callers must gate), updateFirmHq/Discord (ADMIN-gated). Missing: rename — FirmMapper has create/update/archive but no name-change method.
Approach: add a FirmCommands @Route("admin disband|rename|set proprietor …") group gated on a new business.admin.* perm that bypasses the proprietor checks; reuse disbandFirm/updateProprietor, and add a new renameFirm service+mapper method routed through NameValidator + a uniqueness check (mirroring createFirm).
technofied · Jun 4, 2026, 12:53 PM
Would be nice if we could rename firms with this one?
tesks · Jun 5, 2026, 7:38 AM
Implemented on develop (commit 7d7f8ed).
New /firm admin … command group, each route gated on a business.admin.* node (not registered in plugin.yml, like the rest of the fine-grained nodes — grant via LuckPerms). All bypass proprietor/firm-role checks:
| Command | Permission |
|---|---|
admin disband <firm> | business.admin.disband |
admin rename <firm> <newname> | business.admin.rename |
admin set hq <firm> <plot> | business.admin.attribute |
admin set discord <firm> <url> | business.admin.attribute |
admin set proprietor <firm> <player> | business.admin.proprietor |
Service layer
- Force-disband reuses the real disband mechanics — extracted
disbandInternal(firm)(drains balances to the proprietor + archives) so the proprietor-gated and admin paths share it; admin path skips only theisProprietorcheck. Idempotent (already-disbanded → rejected). - rename is the genuinely new piece (
FirmMapperhad no name-change).renameFirmvalidates via the same rules as creation — extractedvalidateFirmName(...)shared withcreateFirm— and rejects collisions with a different firm (self-rename / case-change is allowed). Persists throughupdateFirm's existing conditionaldisplay_nameset. - set hq/discord/proprietor reuse the ungated mutators.
The admin firm arg tab-completes from firms with someone online (OnlineFirmName) but resolves any firm by name/id. <newname> is a single token, consistent with create.
Tests: 13 new cases in FirmServiceImplTest (admin disband bypass + guards, rename success/unknown/invalid/duplicate/self-rename, set hq/discord/proprietor, unknown-firm guard). Coverage gate (≥95%) green.
Bonus: dropped the stale "ampersand" wording from the firm-name validation message (PAR-53 removed & from the validator).
Activity
- ParadauxIO linked a commit — Commit 7d7f8ed — Add staff/DOC firm administration commands (PAR-11)
- ParadauxIO changed status to Status → Done
- ParadauxIO linked a pull request — PR #6 merged — Release: develop → main
- ParadauxIO linked a pull request — PR #6 open — Release: develop → main
- ParadauxIO linked a pull request — PR #6 open — Release: develop → main
- ParadauxIO linked a pull request — PR #6 open — Release: develop → main
- ParadauxIO linked a pull request — PR #6 open — Release: develop → main
- ParadauxIO linked a pull request — PR #6 open — Release: develop → main
- ParadauxIO linked a pull request — PR #6 open — Release: develop → main
- tesks commented
- tesks changed status to Status → Pending Release
- ParadauxIO linked a commit — Commit 7d7f8ed — Add staff/DOC firm administration commands (PAR-11)
- tesks changed status to Status → In Progress
- technofied commented
- tesks description: Description updated
- tesks commented
- tesks assigned Assigned to rian