Fixes an issue with ranks (#91848)

## About The Pull Request

All these guard checks, layers and layers of protection, built from the
ground to the outer firmament, and you fucking got the negation wrong.
This commit is contained in:
LemonInTheDark
2025-06-26 20:59:41 -07:00
committed by GitHub
parent ccf63fc734
commit afdd88c717
+1 -1
View File
@@ -509,7 +509,7 @@ ADMIN_VERB(edit_admin_permissions, R_PERMISSIONS, "Permissions Panel", "Edit adm
if(!admin_rank)
return
for(var/datum/admin_rank/R in GLOB.admin_ranks)
if(R.name == admin_rank && (!(R.rights & usr.client.holder.can_edit_rights_flags()) == R.rights))
if(R.name == admin_rank && ((R.rights & usr.client.holder.can_edit_rights_flags()) != R.rights))
to_chat(usr, "<span class='admin prefix'>You don't have edit rights to all the rights this rank has, rank deletion not permitted.</span>", confidential = TRUE)
return
if(!CONFIG_GET(flag/admin_legacy_system) && CONFIG_GET(flag/protect_legacy_ranks) && (admin_rank in GLOB.protected_ranks))