> 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-v3/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>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.av-scripts.com/laptop-pack-v3/cameras/app/server-groups.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
