Add role bans tab to the bans admin window (#20388)

This commit is contained in:
DrSmugleaf
2023-09-22 14:08:28 -07:00
committed by GitHub
parent 8299fcbb65
commit 71ab660885
23 changed files with 437 additions and 160 deletions

View File

@@ -6,12 +6,14 @@ namespace Content.Shared.Administration.BanList;
[Serializable, NetSerializable]
public sealed class BanListEuiState : EuiStateBase
{
public BanListEuiState(string banListPlayerName, List<SharedServerBan> bans)
public BanListEuiState(string banListPlayerName, List<SharedServerBan> bans, List<SharedServerRoleBan> roleBans)
{
BanListPlayerName = banListPlayerName;
Bans = bans;
RoleBans = roleBans;
}
public string BanListPlayerName { get; }
public List<SharedServerBan> Bans { get; }
public List<SharedServerRoleBan> RoleBans { get; }
}

View File

@@ -4,7 +4,7 @@ using Robust.Shared.Serialization;
namespace Content.Shared.Administration.BanList;
[Serializable, NetSerializable]
public sealed record SharedServerBan(
public record SharedServerBan(
int? Id,
NetUserId? UserId,
(string address, int cidrMask)? Address,

View File

@@ -0,0 +1,18 @@
using Robust.Shared.Network;
using Robust.Shared.Serialization;
namespace Content.Shared.Administration.BanList;
[Serializable, NetSerializable]
public sealed record SharedServerRoleBan(
int? Id,
NetUserId? UserId,
(string address, int cidrMask)? Address,
string? HWId,
DateTime BanTime,
DateTime? ExpirationTime,
string Reason,
string? BanningAdminName,
SharedServerUnban? Unban,
string Role
) : SharedServerBan(Id, UserId, Address, HWId, BanTime, ExpirationTime, Reason, BanningAdminName, Unban);