Adds a config toggle for granting admin server profile access (#64408)

* adds allow_admin_profiling config entry

* Update config/config.txt

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>

* per mso request, add the second define

* actually adds the second define

* allows through Profile requests if the config isn't init'd yet

* makes sure we're loaded

* Update code/game/world.dm

Co-authored-by: Kyle Spier-Swenson <kyleshome@gmail.com>

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
Co-authored-by: Kyle Spier-Swenson <kyleshome@gmail.com>
This commit is contained in:
Ryll Ryll
2022-02-03 11:44:47 -08:00
committed by GitHub
co-authored by Mothblocks Kyle Spier-Swenson
parent 0baf486ab0
commit 48f37a3a5c
4 changed files with 17 additions and 2 deletions
+3 -2
View File
@@ -62,8 +62,9 @@ GLOBAL_PROTECT(href_token)
rank = R
admin_signature = "Nanotrasen Officer #[rand(0,9)][rand(0,9)][rand(0,9)]"
href_token = GenerateToken()
if(R.rights & R_DEBUG) //grant profile access
world.SetConfig("APP/admin", ckey, "role=admin")
if(!CONFIG_GET(flag/forbid_admin_profiling))
if(R.rights & R_DEBUG) //grant profile access, assuming admin profile access is enabled
world.SetConfig("APP/admin", ckey, "role=admin")
//only admins with +ADMIN start admined
if(protected)
GLOB.protected_admins[target] = src