Getting Started with the Server & ACL

From GTA Network Wiki
Jump to: navigation, search

Getting Started with the Server & ACL




dialog-warning.pngRework required!

The contents of this page are possibly invalid or incomplete. Please treat the contents of this page with caution!

If you are able to, please modify the page so that it's factually correct.



Access Control List

GTA:Network includes tool named Access Control List (ACL) that allows you to keep your gamemode secure and limit access to the commands. The main concept of this file is that you're giving a specific player a set of rights. You can create as many rights as many commands you have.

Default file

Default acl.xml file looks like this:

<?xml version="1.0"?>
<acl xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <group name="Everyone">
    <acl name="Default" />
    <object name="user.*" />
    <object name="resource.*" />
  </group>
  <group name="Moderator">
    <acl name="Moderator" />
  </group>
  <group name="Admin">
    <acl name="Moderator" />
    <acl name="Admin" />
  </group>
  <acl name="Default">
    <right name="command.kick" access="false" />
    <right name="command.ban" access="false" />
    <right name="command.stop" access="false" />
    <right name="command.start" access="false" />
    <right name="command.restart" access="false" />
    <right name="command.kill" access="false" />
    <right name="command.forcemap" access="false" />
    <right name="command.ghostmode" access="false" />
    <right name="command.settime" access="false" />
    <right name="command.setweather" access="false" />
    <right name="command.blackout" access="false" />
  </acl>
  <acl name="Moderator">
    <right name="command.kick" access="true" />
    <right name="command.ban" access="true" />
    <right name="command.kill" access="true" />
    <right name="command.forcemap" access="true" />
    <right name="command.ghostmode" access="true" />
    <right name="command.settime" access="true" />
    <right name="command.setweather" access="true" />
    <right name="command.blackout" access="true" />
  </acl>
  <acl name="Admin">
    <right name="command.stop" access="true" />
    <right name="command.start" access="true" />
    <right name="command.restart" access="true" />
  </acl>
</acl>

Understanding the ACL & Default Groups

There are two major components to the ACL: groups (<group name=""> nodes) and ACL lists (<acl name=""> nodes).


Default ACL provided some default groups with rights for example commands. These groups are:

  • Everyone
  • Moderator
  • Admin

Let's take, for example, the Everyone group:

<group name="Everyone">
    <acl name="Default" />
    <object name="user.*" />
</group>

First, we notice the acl name inside the group by the code <acl name="Default" />. It defines what permissions the group has. Users in this group will have the permissions specified on the "Default" ACL list. This group is special, in that that includes every user by using a wildcard (<acl name="user.*" />). This means every user is in this group automatically.


Now, second part of this file - ACL list node.

<acl name="Default">
    <right name="command.kick" access="false" />
    <right name="command.ban" access="false" />
    <right name="command.stop" access="false" />
    <right name="command.start" access="false" />
    <right name="command.restart" access="false" />
    <right name="command.kill" access="false" />
    <right name="command.forcemap" access="false" />
    <right name="command.ghostmode" access="false" />
    <right name="command.settime" access="false" />
    <right name="command.setweather" access="false" />
    <right name="command.blackout" access="false" />
  </acl>

Finally another example, setting a user as Admin.

<group name="Admin">
    <acl name="Moderator" />
    <acl name="Admin" />
    <object name="user.SocialClubID" password="yourpasswordhere"/>
</group>
  • Commands are created when a resource uses [Command] construction. An example would be typing /setweather in the chat for the freeroam resource. For default acl.xml file, user must be at least in group called "Moderator" in order to use this command.