> For the complete documentation index, see [llms.txt](https://rqver-resources.gitbook.io/rq-dogs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://rqver-resources.gitbook.io/rq-dogs/script-configuration/dog-access-configuration.md).

# Dog Access Configuration

## Shared.AcePermission

RQ-Dogs allows you to restrict access to dog-related commands to ace permissions. This configuration option is a permission, not a group. Leaving this as empty quotes will disable the ace permission check.\
\
To setup access via a permission,  first pick a name for your permission and place it in the config:

<pre class="language-lua"><code class="lang-lua"><strong>Shared.AcePermission = "changeMe" -- The ace permission required to use dog-related commands. Leave empty to disable.
</strong></code></pre>

Then, in your `server.cfg` file, you can grant this permission to an identifier or group:

```yaml
# Granting the permission to a group
add_ace group.admin yourPermission allow

# Granting the permission to an identifier
add_ace identifier.discord:707041801789243393 yourPermission allow
```

To disable this check, leave the quotes empty:

```lua
Shared.AcePermission = "" -- The ace permission required to use dog-related commands. Leave empty to disable.
```

## Shared.RadioChannels

RQ-Dogs allows you to restrict access to dog-related commands to players that are actively on a radio channel. **This table is populated with 1.0 by default in the config, so you will have to make the table empty to disable this check.**&#x20;

```lua
-- Restricting access to one radio channel
Shared.RadioChannels = { 1.0 } -- The radio channels a player must be connected to to use dog-related commands. Make the table empty to disable.

-- Restricting access to one of many radio channels
Shared.RadioChannels = { 1.0, 1.1, 2.0, 2.1 } -- The radio channels a player must be connected to to use dog-related commands. Make the table empty to disable.

-- Disabling the radio channel check (empty table)
Shared.RadioChannels = { } -- The radio channels a player must be connected to to use dog-related commands. Make the table empty to disable.
```

## Shared.AuthorizedJobs

RQ-Dogs allows you to restrict access to dog-related commands to players that have a certain job, at a certain grade. This calls the `hasJob` function in the unlocked `server/sv_open.lua` file. Each grade that has access to the commands within a job must be explicitly declared.&#x20;

<pre class="language-lua"><code class="lang-lua"><strong>-- Restricts access to those that hold the 'police' job, and have grade 1, 2, or 3.
</strong><strong>Shared.AuthorizedJobs = { ["police"] = { 1, 2, 3 } } -- The jobs and grades required to use dog-related commands. Framework cannot be STANDALONE for this to work. Make the table empty to disable.
</strong><strong>
</strong><strong>-- Restricts access to those that hold the 'police' job or 'sheriff' job, with grades 1 or 2.
</strong>Shared.AuthorizedJobs = { ["police"] = { 1, 2 }, ["sheriff"] = { 1, 2 } } -- The jobs and grades required to use dog-related commands. Framework cannot be STANDALONE for this to work. Make the table empty to disable.

-- Disables job restrictions. You can also set the framework to STANDALONE for this check to do nothing.
Shared.AuthorizedJobs = { } -- The jobs and grades required to use dog-related commands. Framework cannot be STANDALONE for this to work. Make the table empty to disable.
</code></pre>

## Shared.CustomAccess

RQ-Dogs allows you to restrict access to dog-related commands based on the return of a custom function. If this is enabled, the `customCheck(playerId)` in the `server/sv_open.lua` file must return true in order to access dog-related commands.

<pre class="language-lua"><code class="lang-lua"><strong>-- Enable Custom Access (sh_main.lua)
</strong><strong>Shared.CustomAccess = true-- Enable/disable the custom check defined in sv_open.
</strong><strong>
</strong><strong>-- Custom Access Function (sv_open.lua)
</strong>function customCheck(playerId)
    return true
end

-- Disable Custom Access (sh_main.lua)
Shared.CustomAccess = false -- Enable/disable the custom check defined in sv_open.
</code></pre>
