Repository navigation
feat(auth): add ban_detail to ban info - #492
Merged
Merged
Conversation
Add the player-facing ban_detail field to LootLockerBanInfo, which is shared by the Get Player Ban Status response and the player_banned error data returned when a banned player attempts to start a session. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Existing ban integration tests do not verify deserialization of the newly added field.
Review effort: Balanced
Findings: 1
Open (1)
What changed in this PR
Adds player-facing ban details to the shared ban model.
Changes:
- Adds the
ban_detailresponse property. - Documents its purpose and empty-state behavior.
| File | Description |
|---|---|
Runtime/Game/Requests/LootLockerBanRequest.cs |
Extends shared ban information with ban_detail. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Extend LootLockerTestPlayerBan.BanPlayer with an optional banDetail parameter and assert the value is returned by both GetPlayerBanStatus and the banned session-start error data. Without this, a misspelled JSON property would compile and pass every test while leaving the new field permanently empty. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

Summary
Adds the new player-facing
ban_detailfield toLootLockerBanInfo.ban_detailis a human-readable ban reason supplied by the moderator, distinct fromban_reason(the machine-readablemanual/chargebackenum) and frommoderator_notes(internal-only, never exposed).LootLockerBanInfois the single shared model used by both ban-facing responses, so this one addition covers:POST /game/session/ban-status) →ban.ban_detail403 player_banned) →errorData.ban.ban_detailIt also flows through to
LootLockerConnectionStateResponse.BanDetails.The field is a plain non-nullable string and is empty when no detail was set.
Backend / spec
Already shipped — no backend or ApiDog changes are part of this PR:
go-backenddatabase/bannedplayers/convenience.goBanInfoalready includesban_detail(commit2ddc974d5, onmain).ban_detailas a required property onBanInfo.Verification
Compile-only, gated on CI (
Compile Check).Closes lootlocker/index#1751