Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Dutchman101 authored Jun 11, 2024
2 parents b902731 + 3b82b2e commit 607ce68
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 9 deletions.
12 changes: 6 additions & 6 deletions [admin]/admin/client/gui/admin_acl.lua
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ function aManageACL ()
guiGridListSetSortingEnabled ( aACLList, false )
guiGridListAddColumn( aACLList, "", 0.10 )
guiGridListAddColumn( aACLList, "", 0.85 )
aACLCreateGroup = guiCreateButton ( 0.55, 0.05, 0.40, 0.04, "Create group", true, aAclForm )
aACLCreateACL = guiCreateButton ( 0.55, 0.10, 0.40, 0.04, "Create ACL", true, aAclForm )
aACLCreateGroup = guiCreateButton ( 0.55, 0.05, 0.40, 0.04, "Create group", true, aAclForm, "aclcreate" )
aACLCreateACL = guiCreateButton ( 0.55, 0.10, 0.40, 0.04, "Create ACL", true, aAclForm, "aclcreate" )
aACLLabel = guiCreateLabel ( 0.55, 0.19, 0.40, 0.04, "", true, aAclForm )
aACLSeparator = guiCreateStaticImage ( 0.55, 0.235, 0.40, 0.0025, "client\\images\\dot.png", true, aAclForm )
aACLDestroyGroup = guiCreateButton ( 0.55, 0.25, 0.40, 0.04, "Destroy group", true, aAclForm )
aACLDestroyACL = guiCreateButton ( 0.55, 0.25, 0.40, 0.04, "Destroy ACL", true, aAclForm )
aACLAddObject = guiCreateButton ( 0.55, 0.30, 0.40, 0.04, "Add Object", true, aAclForm )
aACLRemoveObject = guiCreateButton ( 0.55, 0.35, 0.40, 0.04, "Remove Object", true, aAclForm )
aACLDestroyGroup = guiCreateButton ( 0.55, 0.25, 0.40, 0.04, "Destroy group", true, aAclForm, "acldestroy" )
aACLDestroyACL = guiCreateButton ( 0.55, 0.25, 0.40, 0.04, "Destroy ACL", true, aAclForm, "acldestroy" )
aACLAddObject = guiCreateButton ( 0.55, 0.30, 0.40, 0.04, "Add Object", true, aAclForm, "acladd" )
aACLRemoveObject = guiCreateButton ( 0.55, 0.35, 0.40, 0.04, "Remove Object", true, aAclForm, "aclremove" )
aACLAddACL = guiCreateButton ( 0.55, 0.40, 0.40, 0.04, "Add ACL", true, aAclForm )
aACLRemoveACL = guiCreateButton ( 0.55, 0.45, 0.40, 0.04, "Remove ACL", true, aAclForm )

Expand Down
2 changes: 1 addition & 1 deletion [admin]/admin/client/gui/admin_main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ y=y+B aTab1.VehicleHealth = guiCreateLabel ( 0.26, y, 0.25, 0.04, "Vehicle Heal

aTab2 = {}
aTab2.Tab = guiCreateTab ( "Resources", aTabPanel, "resources" )
aTab2.ManageACL = guiCreateButton ( 0.75, 0.02, 0.23, 0.04, "Manage ACL", true, aTab2.Tab )
aTab2.ManageACL = guiCreateButton ( 0.75, 0.02, 0.23, 0.04, "Manage ACL", true, aTab2.Tab, "aclmanager" )
aTab2.ResourceListSearch = guiCreateEdit ( 0.03, 0.05, 0.31, 0.04, "", true, aTab2.Tab )
guiCreateStaticImage ( 0.34, 0.05, 0.035, 0.04, "client\\images\\search.png", true, aTab2.Tab )
aTab2.ResourceList = guiCreateGridList ( 0.03, 0.10, 0.35, 0.80, true, aTab2.Tab )
Expand Down
24 changes: 24 additions & 0 deletions [admin]/admin/conf/ACL.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@
<right name="command.stopall" access="false" />
<right name="command.delete" access="true" />
<right name="command.restart" access="true" />
<!--ACL Manager related-->
<right name="command.aclmanager" access="true" />
<right name="command.aclcreate" access="true" />
<right name="command.acldestroy" access="true" />
<right name="command.acladd" access="true" />
<right name="command.aclremove" access="true" />
<!--Server related-->
<right name="command.setpassword" access="true" />
<right name="command.setwelcome" access="true" />
Expand Down Expand Up @@ -137,6 +143,12 @@
<right name="command.stopall" access="false" />
<right name="command.delete" access="false" />
<right name="command.restart" access="true" />
<!--ACL Manager related-->
<right name="command.aclmanager" access="false" />
<right name="command.aclcreate" access="false" />
<right name="command.acldestroy" access="false" />
<right name="command.acladd" access="false" />
<right name="command.aclremove" access="false" />
<!--Server related-->
<right name="command.setpassword" access="true" />
<right name="command.setwelcome" access="true" />
Expand Down Expand Up @@ -217,6 +229,12 @@
<right name="command.stopall" access="false" />
<right name="command.delete" access="false" />
<right name="command.restart" access="false" />
<!--ACL Manager related-->
<right name="command.aclmanager" access="false" />
<right name="command.aclcreate" access="false" />
<right name="command.acldestroy" access="false" />
<right name="command.acladd" access="false" />
<right name="command.aclremove" access="false" />
<!--Server related-->
<right name="command.setpassword" access="false" />
<right name="command.setwelcome" access="false" />
Expand Down Expand Up @@ -297,6 +315,12 @@
<right name="command.stopall" access="false" />
<right name="command.delete" access="false" />
<right name="command.restart" access="false" />
<!--ACL Manager related-->
<right name="command.aclmanager" access="false" />
<right name="command.aclcreate" access="false" />
<right name="command.acldestroy" access="false" />
<right name="command.acladd" access="false" />
<right name="command.aclremove" access="false" />
<!--Server related-->
<right name="command.setpassword" access="false" />
<right name="command.setwelcome" access="false" />
Expand Down
2 changes: 1 addition & 1 deletion [admin]/admin/meta.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<meta>
<info author="lil_Toady" type="misc" version="1.5.9" />
<info author="lil_Toady" type="misc" version="1.6.0" />
<min_mta_version client="1.5.9-9.20957.0" server="1.5.9-9.20957.0"/>
<!--
Admin System Meta File.
Expand Down
15 changes: 14 additions & 1 deletion [admin]/admin/server/admin_server.lua
Original file line number Diff line number Diff line change
Expand Up @@ -663,9 +663,22 @@ addEventHandler ( "aTeam", root, function ( action, name, r, g, b )
return false
end )

local aAdminRights = {
["settings"] = "general.tab_resources",
["resourcelist"] = "general.tab_resources",

["sync"] = "command.aclmanager",
["aclcreate"] = "command.aclcreate",
["acldestroy"] = "command.acldetroy",
["acladd"] = "command.acladd",
["aclremove"] = "command.aclremove",
}
addEvent ( "aAdmin", true )
addEventHandler ( "aAdmin", root, function ( action, ... )
if checkClient( true, source, 'aAdmin', action ) then
if not action then
return
end
if checkClient( aAdminRights[action] or true, source, 'aAdmin', action ) then
return
end
local mdata, mdata2
Expand Down
3 changes: 3 additions & 0 deletions [admin]/admin/server/admin_sync.lua
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ function aSynchCoroutineFunc( type, data, typeOfTag, banSearchTag )
end
end
elseif ( type == "resources" ) then
if not hasObjectPermissionTo( source, "general.tab_resources" ) then
return
end
local resourceTable = getResources()
local tick = getTickCount()
local antiCorMessageSpam = 0
Expand Down

0 comments on commit 607ce68

Please sign in to comment.