diff --git a/code/modules/admin/admin_ranks.dm b/code/modules/admin/admin_ranks.dm index 94793f3b9479..3467bd4276b7 100644 --- a/code/modules/admin/admin_ranks.dm +++ b/code/modules/admin/admin_ranks.dm @@ -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 diff --git a/code/modules/admin/holder2.dm b/code/modules/admin/holder2.dm index f202e0a6ecbe..b1ba6709b258 100644 --- a/code/modules/admin/holder2.dm +++ b/code/modules/admin/holder2.dm @@ -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) @@ -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)