Skip to content

Commit 6df3ffe

Browse files
committed
Add missing rights for setglitchenabled and setworldspecprop
1 parent 2c62ee9 commit 6df3ffe

File tree

2 files changed

+18
-7
lines changed

2 files changed

+18
-7
lines changed

[admin]/admin/client/gui/admin_main.lua

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,10 @@ y=y+B aTab1.VehicleHealth = guiCreateLabel ( 0.26, y, 0.25, 0.04, "Vehicle Heal
279279
guiGridListAddColumn( aTab3.ServerSettingsGridList, "Status/Value", 0.2 )
280280
guiGridListSetSortingEnabled( aTab3.ServerSettingsGridList, false )
281281

282+
if not hasPermissionTo("command.setglitchenabled") or not hasPermissionTo("command.setworldspecprop") then
283+
guiSetEnabled(aTab3.ServerSettingsGridList, false)
284+
end
285+
282286
local glitchData = {
283287
{name = "Quick Reload", id = "quickreload"},
284288
{name = "Fast Move", id = "fastmove"},
@@ -339,9 +343,9 @@ y=y+B aTab1.VehicleHealth = guiCreateLabel ( 0.26, y, 0.25, 0.04, "Vehicle Heal
339343
guiGridListSetItemColor(aTab3.ServerSettingsGridList, row, 3, 255, 0, 0)
340344
aTab3.ServerSettings[prop.id] = {row = row, type = "worldprop", enabled = false}
341345
end
342-
aTab3.SettingsReset = guiCreateButton(0.61, 0.70, 0.15, 0.04, "Reset All", true, aTab3.Tab)
343-
aTab3.SettingsEnableAll = guiCreateButton(0.61, 0.75, 0.15, 0.04, "Enable All", true, aTab3.Tab)
344-
aTab3.SettingsDisableAll = guiCreateButton(0.61, 0.80, 0.15, 0.04, "Disable All", true, aTab3.Tab)
346+
aTab3.SettingsReset = guiCreateButton(0.61, 0.70, 0.15, 0.04, "Reset All", true, aTab3.Tab, "setglitchenabled")
347+
aTab3.SettingsEnableAll = guiCreateButton(0.61, 0.75, 0.15, 0.04, "Enable All", true, aTab3.Tab, "setglitchenabled")
348+
aTab3.SettingsDisableAll = guiCreateButton(0.61, 0.80, 0.15, 0.04, "Disable All", true, aTab3.Tab, "setglitchenabled")
345349

346350

347351
aTab4 = {}
@@ -1069,19 +1073,18 @@ function aClientDoubleClick ( button )
10691073
aBanDetails ( aBans["Serial"][selserial] and selserial or selip )
10701074
end
10711075
elseif ( source == aTab3.ServerSettingsGridList ) then
1072-
local selectedRow = guiGridListGetSelectedItem(aTab3.ServerSettingsGridList)
1076+
local selectedRow = guiGridListGetSelectedItem(aTab3.ServerSettingsGridList)
10731077
if selectedRow ~= -1 then
10741078
local settingType = guiGridListGetItemData(aTab3.ServerSettingsGridList, selectedRow, 1)
10751079
local settingId = guiGridListGetItemData(aTab3.ServerSettingsGridList, selectedRow, 2)
1076-
local settingName = guiGridListGetItemText(aTab3.ServerSettingsGridList, selectedRow, 2)
1077-
if settingType == "glitch" then
1080+
if settingType == "glitch" and hasPermissionTo("command.setglitchenabled") then
10781081
local currentStatus = aTab3.ServerSettings[settingId].enabled
10791082
local newStatus = not currentStatus
10801083
aTab3.ServerSettings[settingId].enabled = newStatus
10811084
guiGridListSetItemText(aTab3.ServerSettingsGridList, selectedRow, 3, newStatus and "Enabled" or "Disabled", false, false)
10821085
guiGridListSetItemColor(aTab3.ServerSettingsGridList, selectedRow, 3, newStatus and 0 or 255, newStatus and 255 or 0, 0)
10831086
triggerServerEvent("aServer", localPlayer, "setglitchenabled", settingId, newStatus)
1084-
elseif settingType == "worldprop" then
1087+
elseif settingType == "worldprop" and hasPermissionTo("command.setworldspecprop") then
10851088
local currentStatus = aTab3.ServerSettings[settingId].enabled
10861089
local newStatus = not currentStatus
10871090
aTab3.ServerSettings[settingId].enabled = newStatus

[admin]/admin/conf/ACL.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@
7878
<right name="command.setfpslimit" access="true" />
7979
<right name="function.shutdown" access="true" />
8080
<right name="command.clearchat" access="true" />
81+
<right name="command.setglitchenabled" access="true" />
82+
<right name="command.setworldspecprop" access="true" />
8183
<!--Bans related-->
8284
<right name="command.ban" access="true" />
8385
<right name="command.unban" access="true" />
@@ -164,6 +166,8 @@
164166
<right name="command.settime" access="true" />
165167
<right name="command.setfpslimit" access="false" />
166168
<right name="command.clearchat" access="true" />
169+
<right name="command.setglitchenabled" access="false" />
170+
<right name="command.setworldspecprop" access="false" />
167171
<!--Bans related-->
168172
<right name="command.ban" access="true" />
169173
<right name="command.unban" access="true" />
@@ -250,6 +254,8 @@
250254
<right name="command.settime" access="true" />
251255
<right name="command.setfpslimit" access="false" />
252256
<right name="command.clearchat" access="true" />
257+
<right name="command.setglitchenabled" access="false" />
258+
<right name="command.setworldspecprop" access="false" />
253259
<!--Bans related-->
254260
<right name="command.ban" access="false" />
255261
<right name="command.unban" access="false" />
@@ -315,6 +321,8 @@
315321
<right name="command.stopall" access="false" />
316322
<right name="command.delete" access="false" />
317323
<right name="command.restart" access="false" />
324+
<right name="command.setglitchenabled" access="false" />
325+
<right name="command.setworldspecprop" access="false" />
318326
<!--ACL Manager related-->
319327
<right name="command.aclmanager" access="false" />
320328
<right name="command.aclcreate" access="false" />

0 commit comments

Comments
 (0)