Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes maintainer access to the profiler and clears profiler access whenever admins are loaded. #7909

Merged
merged 7 commits into from
Jan 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions code/modules/admin/admin_ranks.dm
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ GLOBAL_LIST_EMPTY(admin_ranks) //list of all ranks with associated rights
C.admin_holder = null
GLOB.admins.Cut()

//Clear profile access
for(var/admin in world.GetConfig("admin"))
log_debug("Clearing [admin] from APP/admin.")
world.SetConfig("APP/admin", admin, null)

load_admin_ranks()

//load text from file
Expand Down
6 changes: 3 additions & 3 deletions code/modules/admin/holder2.dm
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ GLOBAL_PROTECT(href_token)
href_token = GenerateToken()
GLOB.admin_datums[ckey] = src
extra_titles = new_extra_titles
if(rights & R_PROFILER)
log_debug("Adding [ckey] to APP/admin.")
world.SetConfig("APP/admin", ckey, "role=admin")

// Letting admins edit their own permission giver is a poor idea
/datum/admins/vv_edit_var(var_name, var_value)
Expand All @@ -44,9 +47,6 @@ GLOBAL_PROTECT(href_token)
owner.tgui_say.load()
owner.update_special_keybinds()
GLOB.admins |= C
if(owner.admin_holder.rights & R_PROFILER)
if(!world.GetConfig("admin", C.ckey))
world.SetConfig("APP/admin", C.ckey, "role = coder")

/datum/admins/proc/disassociate()
if(owner)
Expand Down
Loading