> For the complete documentation index, see [llms.txt](https://docs.av-scripts.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.av-scripts.com/laptop-pack/cameras/app/server-groups.md).

# Server Groups

Server groups are pre-configured categories managed by administration. \
You can find and modify the list in `server/editable/groups.lua`.

Each group must follow this structure:

* **Group Key** (`string`): The index key. A unique identifier for the group.
* **label** (`string`): The display name shown to users with access in their App.
* **canAccess** `function(playerId)`: A function that must return `true` to grant the player access to the group, or `false` to hide it from them.

{% code title="av\_cameras/server/editable/groups.lua" %}

```lua
Config.FixedGroups = {
    ["pacific_bank"] = { -- index key should be unique
        label = "Pacific Bank",
        canAccess = function(playerId)
            local hasAccess = false
            -- Add your own check here and set hasAccess to true if the player should have access to Pacific Bank cameras, for example:
            hasAccess = exports['av_laptop']:hasJob(playerId, {"police", "sheriff", "leo", "bsco"})
            -- Leave the rest of the code as is, it will print a debug message with the result
            dbug("Does player with server id "..tostring(playerId).." have access to bank cameras? "..tostring(hasAccess))
            return hasAccess
        end,
    },
}
```

{% endcode %}

{% hint style="warning" %}
Cameras belonging to this group can only be installed and linked via the Administration Panel. Players will be able to monitor them and access their recorded memory, but they cannot rename, transfer, delete, or share them.
{% endhint %}

<figure><img src="/files/feVkk424Y3mO76uShE9G" alt=""><figcaption></figcaption></figure>
