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.

(cherry picked from commit afdd88c717)
This commit is contained in:
LemonInTheDark
2025-06-26 20:59:41 -07:00
committed by Roxy
parent bf2a6baf27
commit ed494bca0a
+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))