Added some missing engine command permissions. (#5782)

If you want to bikeshed this further, open an issue.
This commit is contained in:
Vera Aguilera Puerto
2021-12-18 14:16:34 +01:00
committed by GitHub
parent e9c812c29c
commit a46c2e6c9d
4 changed files with 65 additions and 10 deletions

View File

@@ -38,7 +38,7 @@ namespace Content.Client.Administration.Managers
public bool CanViewVar()
{
return _adminData?.CanViewVar() ?? false;
return CanCommand("vv");
}
public bool CanAdminPlace()

View File

@@ -443,7 +443,7 @@ namespace Content.Server.Administration.Managers
public bool CanViewVar(IPlayerSession session)
{
return GetAdminData(session)?.CanViewVar() ?? false;
return CanCommand(session, "vv");
}
public bool CanAdminPlace(IPlayerSession session)

View File

@@ -32,14 +32,6 @@ namespace Content.Shared.Administration
return Active && (Flags & flag) == flag;
}
/// <summary>
/// Check if this admin can open the VV menu.
/// </summary>
public bool CanViewVar()
{
return HasFlag(AdminFlags.VarEdit);
}
/// <summary>
/// Check if this admin can spawn stuff in with the entity/tile spawn panel.
/// </summary>

View File

@@ -4,12 +4,36 @@
- help
- list
- quit
- hardquit
- cvar
- svbind
- bind
- exec # macro moment
- clear
- vram
- monitor
- setmonitor
- keyinfo
- setclipboard
- getclipboard
- gcf
- net_graph
- net_watchent
- net_draw_interp
- devwindow
- fill
- dumpentities
- getcomponentregistration
- fuck
- Flags: VAREDIT
Commands:
- addcomp
- addcompc
- rmcomp
- rmcompc
- vv
- scale
- Flags: DEBUG
Commands:
@@ -23,13 +47,47 @@
- netaudit
- querymappaused
- physics
- showislands
- showtime
- showspritebb
- cldbglyr
- togglefov
- togglehardfov
- togglelight
- togglelightbuf
- toggleshadows
- testbed
- lightbb
- vv
- szr_stats
- addview
- removeview
- hwid
- showpos
- showray
- showchunkbb
- entfo
- sggcell
- ldrsc
- rldrsc
- rldshader
- rldloc
- guidump
- uitest
- chunkinfo
- showanchored
- dmetamem
- launchauth
- lsmonitor
- monitorinfo
- watch
- sendgarbage
- setinputcontext
- showvelocities
- tilelookup
- net_entityreport
- scene
- Flags: MAPPING
Commands:
@@ -44,6 +102,7 @@
- savebp
- savemap
- tpgrid
- gridtc
- Flags: ADMIN
Commands:
@@ -65,6 +124,7 @@
- Flags: SPAWN
Commands:
- spawn
- cspawn
- Flags: HOST
Commands:
@@ -74,6 +134,9 @@
- saveconfig
- testlog
- sudo
- scsi
- csi
- lsasm
- Flags: QUERY
Commands: