From b4c06fb528b179d93fcd3fb0e275402df216e793 Mon Sep 17 00:00:00 2001 From: Debug <49997488+DebugOk@users.noreply.github.com> Date: Wed, 3 Jan 2024 00:48:29 +0100 Subject: [PATCH] Seperate flag for whitelist commands (#637) * Update AdminFlags.cs Signed-off-by: Debug <49997488+DebugOk@users.noreply.github.com> * Update WhitelistCommands.cs Signed-off-by: Debug <49997488+DebugOk@users.noreply.github.com> * Update WhitelistCommands.cs Signed-off-by: Debug <49997488+DebugOk@users.noreply.github.com> --------- Signed-off-by: Debug <49997488+DebugOk@users.noreply.github.com> --- Content.Server/Whitelist/WhitelistCommands.cs | 4 ++-- Content.Shared/Administration/AdminFlags.cs | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Content.Server/Whitelist/WhitelistCommands.cs b/Content.Server/Whitelist/WhitelistCommands.cs index e244418810..691b47ae23 100644 --- a/Content.Server/Whitelist/WhitelistCommands.cs +++ b/Content.Server/Whitelist/WhitelistCommands.cs @@ -11,7 +11,7 @@ using Robust.Shared.Network; namespace Content.Server.Whitelist; -[AdminCommand(AdminFlags.Ban)] +[AdminCommand(AdminFlags.Whitelist)] // DeltaV - Custom permission for whitelist public sealed class AddWhitelistCommand : LocalizedCommands { public override string Command => "whitelistadd"; @@ -71,7 +71,7 @@ public sealed class AddWhitelistCommand : LocalizedCommands } } -[AdminCommand(AdminFlags.Ban)] +[AdminCommand(AdminFlags.Ban | AdminFlags.Whitelist)] // DeltaV - Custom permission for whitelist. Hopefully this is an or, not an and public sealed class RemoveWhitelistCommand : LocalizedCommands { public override string Command => "whitelistremove"; diff --git a/Content.Shared/Administration/AdminFlags.cs b/Content.Shared/Administration/AdminFlags.cs index 05b7a45a46..c33a6be86f 100644 --- a/Content.Shared/Administration/AdminFlags.cs +++ b/Content.Shared/Administration/AdminFlags.cs @@ -89,6 +89,11 @@ /// EditNotes = 1 << 14, + /// + /// DeltaV - The ability to whitelist people. Either this permission or +BAN is required for remove. + /// + Whitelist = 1 << 15, + /// /// Dangerous host permissions like scsi. ///