Add role bans tab to the bans admin window (#20388)
This commit is contained in:
@@ -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; }
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
18
Content.Shared/Administration/BanList/SharedServerRoleBan.cs
Normal file
18
Content.Shared/Administration/BanList/SharedServerRoleBan.cs
Normal 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);
|
||||
Reference in New Issue
Block a user