Skip to content

feat(auth): add ban_detail to ban info - #492

Merged
kirre-bylund merged 2 commits into
devfrom
feat/1751-ban-detail
Oct 7, 2026
Merged

kirre-bylund merged 2 commits into
devfrom
feat/1751-ban-detail

Conversation

@kirre-bylund

Copy link
Copy Markdown
Contributor

Summary

Adds the new player-facing ban_detail field to LootLockerBanInfo.

ban_detail is a human-readable ban reason supplied by the moderator, distinct from ban_reason (the machine-readable manual / chargeback enum) and from moderator_notes (internal-only, never exposed).

LootLockerBanInfo is the single shared model used by both ban-facing responses, so this one addition covers:

  • Get Player Ban Status (POST /game/session/ban-status) → ban.ban_detail
  • Session start as a banned player (403 player_banned) → errorData.ban.ban_detail

It 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-backend database/bannedplayers/convenience.go BanInfo already includes ban_detail (commit 2ddc974d5, on main).
  • The game OAS already documents ban_detail as a required property on BanInfo.

Verification

Compile-only, gated on CI (Compile Check).

Closes lootlocker/index#1751

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>
Copilot AI balanced review requested due to automatic review settings October 7, 2026 08:32

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Existing ban integration tests do not verify deserialization of the newly added field.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)
What changed in this PR

Adds player-facing ban details to the shared ban model.

Changes:

  • Adds the ban_detail response 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.

Comment thread Runtime/Game/Requests/LootLockerBanRequest.cs
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>
@kirre-bylund
kirre-bylund merged commit e0afbd2 into dev Oct 7, 2026
57 checks passed
@kirre-bylund
kirre-bylund deleted the feat/1751-ban-detail branch October 7, 2026 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants