Class SupportCharactersController
- Namespace
- FishMMO.ControlPanel.Controllers
- Assembly
- FishMMO-ControlPanel.dll
Character views for support staff and operators, and the staff character lock.
[ApiController]
[Route("api/support/characters")]
public sealed class SupportCharactersController : ControllerBase
- Inheritance
-
SupportCharactersController
- Inherited Members
Remarks
The reads are here. Edits to a character's stored state live in AdminCharactersController behind a higher policy, so that widening who can look does not widen who can change.
The lock is the exception, and it is a moderation action, not an edit. It changes nothing about the character — it keeps the player out of the world while staff work on it — so it sits where kicking and banning sit: game master and above, with a fresh authenticator code. Every lock and release is recorded by AuditActionFilter.
Constructors
SupportCharactersController(ICharacterService, IAccountService, IKickRequestService, AuditScope, ILogger<SupportCharactersController>)
public SupportCharactersController(ICharacterService characters, IAccountService accounts, IKickRequestService kickRequests, AuditScope audit, ILogger<SupportCharactersController> log)
Parameters
charactersICharacterServiceaccountsIAccountServicekickRequestsIKickRequestServiceauditAuditScopelogILogger<SupportCharactersController>
Methods
Get(long)
One character, deleted rows included.
[HttpGet("{id:long}")]
[Authorize(Policy = "Support")]
public Task<IActionResult> Get(long id)
Parameters
idlong
Returns
Lock(long, LockRequest)
Locks a character out of the world until the lock lapses.
[HttpPost("{id:long}/lock")]
[Authorize(Policy = "Support.StepUp")]
[Audited("character.lock", TargetType = "character", TargetRouteValue = "id")]
public Task<IActionResult> Lock(long id, SupportCharactersController.LockRequest request)
Parameters
idlongrequestSupportCharactersController.LockRequest
Returns
Remarks
Character select refuses a locked character. One already in the world is disconnected: kicks are account-wide, so the kick request written here disconnects the whole account, and the lock is what then keeps this character from coming straight back.
Search(string, string, bool, int, int)
Searches characters by character-name or account-name prefix.
[HttpGet]
[Authorize(Policy = "Support")]
public Task<IActionResult> Search(string query, string online, bool includeDeleted = true, int page = 1, int pageSize = 15)
Parameters
Returns
Unlock(long, LockRequest)
Releases a character lock before it lapses.
[HttpPost("{id:long}/unlock")]
[Authorize(Policy = "Support.StepUp")]
[Audited("character.unlock", TargetType = "character", TargetRouteValue = "id")]
public Task<IActionResult> Unlock(long id, SupportCharactersController.LockRequest request)
Parameters
idlongrequestSupportCharactersController.LockRequest