mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-18 10:34:10 +01:00
[MAJOR CHANGE] Admin rank datum (#17133)
* Admin ranks update * Permissions fix * One missing thing * Further rework to make database also fully work * Adds admin rank bitflag calculator to tools * ZA WARUDO --------- Co-authored-by: C.L. <killer65311@gmail.com>
This commit is contained in:
@@ -438,8 +438,17 @@
|
||||
|
||||
/datum/config_entry/flag/no_click_cooldown
|
||||
|
||||
/// Defines whether the server uses the legacy admin system with admins.txt or the SQL system. Config option in config.txt
|
||||
/datum/config_entry/flag/admin_legacy_system
|
||||
/datum/config_entry/flag/admin_legacy_system //Defines whether the server uses the legacy admin system with admins.txt or the SQL system
|
||||
protection = CONFIG_ENTRY_LOCKED
|
||||
|
||||
/datum/config_entry/flag/protect_legacy_admins //Stops any admins loaded by the legacy system from having their rank edited by the permissions panel
|
||||
protection = CONFIG_ENTRY_LOCKED
|
||||
|
||||
/datum/config_entry/flag/protect_legacy_ranks //Stops any ranks loaded by the legacy system from having their flags edited by the permissions panel
|
||||
protection = CONFIG_ENTRY_LOCKED
|
||||
|
||||
/datum/config_entry/flag/load_legacy_ranks_only //Loads admin ranks only from legacy admin_ranks.txt, while enabled ranks are mirrored to the database
|
||||
protection = CONFIG_ENTRY_LOCKED
|
||||
|
||||
/// Defines whether the server uses the legacy banning system with the files in /data or the SQL system. Config option in config.txt
|
||||
/datum/config_entry/flag/ban_legacy_system
|
||||
@@ -721,3 +730,5 @@
|
||||
/// The endpoint for the chat to fetch the chatlogs from (for example, the last 2500 messages on init for the history)
|
||||
/// REQUIRES chatlog_database_backend to be enabled
|
||||
/datum/config_entry/string/chatlog_database_api_endpoint
|
||||
|
||||
/datum/config_entry/flag/forbid_admin_profiling
|
||||
|
||||
@@ -53,7 +53,7 @@ SUBSYSTEM_DEF(persistence)
|
||||
return
|
||||
|
||||
var/list/dat = list("<table width = '100%'>")
|
||||
var/can_modify = check_rights(R_ADMIN, 0, user)
|
||||
var/can_modify = check_rights_for(user.client, (R_ADMIN|R_DEBUG))
|
||||
for(var/thing in persistence_datums)
|
||||
var/datum/persistent/P = persistence_datums[thing]
|
||||
if(P.has_admin_data)
|
||||
|
||||
@@ -174,7 +174,7 @@ SUBSYSTEM_DEF(statpanels)
|
||||
|
||||
/datum/controller/subsystem/statpanels/proc/set_tickets_tab(client/target)
|
||||
var/list/tickets = list()
|
||||
if(check_rights(R_ADMIN|R_SERVER|R_MOD,FALSE,target)) //Prevents non-staff from opening the list of ahelp tickets
|
||||
if(check_rights_for(target, R_ADMIN|R_SERVER|R_MOD)) //Prevents non-staff from opening the list of ahelp tickets
|
||||
tickets += GLOB.ahelp_tickets.stat_entry(target)
|
||||
tickets += GLOB.mhelp_tickets.stat_entry(target)
|
||||
target.stat_panel.send_message("update_tickets", tickets)
|
||||
|
||||
Reference in New Issue
Block a user