# Whitelist

This whitelist module utilizes Sonoran CMS's to enforce player connections.

![Sonoran CMS - Whitelist](https://3006847189-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MdBOa9OFjtdqw9FdXli%2Fuploads%2Fgit-blob-cc9ecf496d4e8f251504c0a35c8dcbc14d72573d%2FCMS_Whitelist.png?alt=media)

{% embed url="<https://www.youtube.com/watch?v=4PAtKYQokXE>" %}

## Whitelisting on QBCore / VMenu

If using QBCore or VMenu on your server, it is recommended that you control whitelisting through their respective game panels, rather than through this plugin. For more information, see the links below:\
[QBCore Game Panel - Whitelisting](https://docs.sonoransoftware.com/cms/integration-capabilities/fivem-game-panel/qbcore-and-qbox-panel/whitelist)

[VMenu Game Panel - Whitelisting](https://docs.sonoransoftware.com/cms/integration-capabilities/fivem-game-panel/vmenu-panel/whitelist)

## Installation / Configuration

{% hint style="info" %}
With core version `v1.4.0` the Whitelist resource was converted to a core module and no longer requires manual installation just configuration.
{% endhint %}

### 1. Configure Clock In Module

Locate the `whitelist` module within your `[sonorancms]/sonorancms/server/modules` folder and rename `whitelist_config.dist.json` so that it is just `whitelist_config.json`.

Next, open the `whitelist_config.json` file and set `enabled` to `true`.

## Configuration

| Config Option | Description                                                                                                                |
| ------------- | -------------------------------------------------------------------------------------------------------------------------- |
| enabled       | If set to `true` it will enable a whitelist for your server and only individuals granted *Allow Whitelist* as shown below. |

### 2. Setup Whitelist Permissions

Navigate to the Rank Manager within the Administrative Panel.

`Administrative Panel` > `Ranks`

![Sonoran CMS - Departments & Ranks](https://3006847189-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MdBOa9OFjtdqw9FdXli%2Fuploads%2FxCry1PI6n6Gj091XOV4F%2FScreenshot%20\(490\).png?alt=media\&token=b4630741-a93d-4276-b520-1f25e6fb3122)

For users in your Sonoran CMS community to be accepted through the whitelist, they'll need to be granted permission for the whitelist through rank permissions.

Granting each rank the permission of **Allow Whitelist** allows those members through the whitelist.

Granting each rank with the permission of **Block Whitelist** blocks users from passing through the whitelist.

{% hint style="warning" %}
**Block Whitelist** will ALWAYS overrule **Allow Whitelist**\
\
If a user is granted both **Block Whitelist** and **Allow Whitelist** through various ranks they will be blocked from the whitelist. Block will always overrule allow.
{% endhint %}

![Sonoran CMS - Rank Manger Server Permissions](https://3006847189-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MdBOa9OFjtdqw9FdXli%2Fuploads%2FHoeXrhuu418NHWx6tUTY%2FScreenshot%20\(491\).png?alt=media\&token=32e78460-0a7e-46c9-ace8-0d2b8ddcef54)

### 3. Add your API ID

Ensure all players have added their [API ID](https://docs.sonoransoftware.com/cms/developer-api-documentation/api-integration/getting-started/api-id-system) to the CMS!

## Reliability Notice

In the event that the CMS API is temporarily unavailable, this resource utilizes a local backup cache. The resource will automatically fall back to the latest saved version of the whitelist, allowing members to join as normal.
