Import december-2020-12-18 from private repo (scrubbed 2026-05-27)

Targets Rec Room 2020.12.18 client.

Re-import after adding:
- DorkNet.ClientMod/dorknet-clientmod.json.template — config schema
  the launcher's manifest-driven patcher renders into UserData/.
- tools/build-patcher-zip.ps1 — produces the dorknet-clientpatch-{key}.zip
  Release asset the launcher fetches.
- .github/workflows/release.yml — auto-publishes both Release assets
  on v1-december-* tag push.

Scrubbed via maintainer-side scrub-for-public.ps1: same drop rules as
the prior import, plus build-patcher-zip.ps1 added to the tools/
allow-list so it survives the scrub.
This commit is contained in:
Alexa
2026-05-27 01:04:12 +03:00
commit 4edf25b2d5
375 changed files with 201291 additions and 0 deletions
@@ -0,0 +1,44 @@
using System.ComponentModel.DataAnnotations;
namespace DorkNet.Server.Data.Entities;
/// <summary>
/// Append-only audit row written every time an admin performs a
/// privileged action (ban, unban, promote, demote, room delete,
/// MOTD change, etc.). The admin watch UI's "audit" tab reads
/// from this in reverse-chronological order.
///
/// Rows are never deleted from the application — privileged actions
/// stay on the record. Storage cost is negligible at single-server
/// scale.
/// </summary>
public class AdminActionEntity
{
public long Id { get; set; }
/// <summary>The admin who performed the action.</summary>
public long AdminPlayerId { get; set; }
/// <summary>Free-form action name. Convention: lower-snake-case verb,
/// e.g. <c>ban_player</c>, <c>unban_player</c>, <c>promote_admin</c>,
/// <c>delete_room</c>, <c>set_motd</c>.</summary>
[MaxLength(64)]
public string Action { get; set; } = string.Empty;
/// <summary>Targeted entity type — <c>player</c>, <c>room</c>,
/// <c>system</c>. Free-form so future actions can introduce new
/// kinds without a migration.</summary>
[MaxLength(32)]
public string TargetType { get; set; } = string.Empty;
/// <summary>Numeric id of the target. <c>0</c> for system-wide
/// actions like setting the MOTD.</summary>
public long TargetId { get; set; }
/// <summary>Optional human reason the admin supplied at action
/// time. Surfaced to the audit log UI verbatim.</summary>
[MaxLength(512)]
public string Reason { get; set; } = string.Empty;
public DateTime Timestamp { get; set; } = DateTime.UtcNow;
}