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:
AffectedArc07
2020-03-25 16:15:18 -06:00
committed by GitHub
parent 23490a52bf
commit 8fdc0a6245
6 changed files with 14 additions and 6 deletions
+5 -1
View File
@@ -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(