mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 03:57:13 +01:00
Adds a permission to only view runtimes (#13072)
* Adds a permission to only view runtimes * It would appear I am half asleep * Almost failed my own CI tests there. good job AA
This commit is contained in:
@@ -44,6 +44,7 @@ GLOBAL_PROTECT(admin_ranks) // this shit is being protected for obvious reasons
|
||||
if("mod") rights |= R_MOD
|
||||
if("mentor") rights |= R_MENTOR
|
||||
if("proccall") rights |= R_PROCCALL
|
||||
if("viewruntimes") rights |= R_VIEWRUNTIMES
|
||||
|
||||
GLOB.admin_ranks[rank] = rights
|
||||
previous_rights = rights
|
||||
|
||||
@@ -230,7 +230,9 @@ GLOBAL_LIST_INIT(admin_verbs_ticket, list(
|
||||
|
||||
/client/proc/add_admin_verbs()
|
||||
if(holder)
|
||||
verbs += GLOB.admin_verbs_default
|
||||
// If they have ANYTHING OTHER THAN ONLY VIEW RUNTIMES (65536), then give them the default admin verbs
|
||||
if(holder.rights != R_VIEWRUNTIMES)
|
||||
verbs += GLOB.admin_verbs_default
|
||||
if(holder.rights & R_BUILDMODE)
|
||||
verbs += /client/proc/togglebuildmodeself
|
||||
if(holder.rights & R_ADMIN)
|
||||
@@ -264,6 +266,8 @@ GLOBAL_LIST_INIT(admin_verbs_ticket, list(
|
||||
verbs += GLOB.admin_verbs_mentor
|
||||
if(holder.rights & R_PROCCALL)
|
||||
verbs += GLOB.admin_verbs_proccall
|
||||
if(holder.rights & R_VIEWRUNTIMES)
|
||||
verbs += /client/proc/view_runtimes
|
||||
|
||||
/client/proc/remove_admin_verbs()
|
||||
verbs.Remove(
|
||||
|
||||
@@ -832,7 +832,7 @@ GLOBAL_PROTECT(AdminProcCaller)
|
||||
set name = "View Runtimes"
|
||||
set desc = "Open the Runtime Viewer"
|
||||
|
||||
if(!check_rights(R_DEBUG))
|
||||
if(!check_rights(R_DEBUG|R_VIEWRUNTIMES))
|
||||
return
|
||||
|
||||
GLOB.error_cache.showTo(usr)
|
||||
|
||||
Reference in New Issue
Block a user