> ## Documentation Index
> Fetch the complete documentation index at: https://waybeyond.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# How do roles and permissions work?

Different roles have different access levels and action abilities. See the table below for the breakdown.

## Organisation Management

| Task                                     | Administrator | Manager | Grower | Viewer |
| ---------------------------------------- | :-----------: | :-----: | :----: | :----: |
| Update organisation details              |       ✔       |    ❌    |    ❌   |    ❌   |
| Edit farm name & address                 |       ✔       |    ❌    |    ❌   |    ❌   |
| Add / edit / delete farm                 |       ✔       |    ❌    |    ❌   |    ❌   |
| Add / edit / delete compartment / sector |       ✔       |    ✔    |    ❌   |    ❌   |

## User Management

| Task            | Administrator |                        Manager                       | Grower | Viewer |
| :-------------- | :-----------: | :--------------------------------------------------: | :----: | :----: |
| Delete users    |       ✔       |     Can only delete managers, growers and viewers    |    ❌   |    ❌   |
| Edit user roles |       ✔       | Can only edit roles of managers, growers and viewers |    ❌   |    ❌   |
| Invite users    |       ✔       |     Can only invite managers, growers and viewers    |    ❌   |    ❌   |

### Team Management

| Task                                  | Administrator |                         Manager                         | Grower | Viewer |
| :------------------------------------ | :-----------: | :-----------------------------------------------------: | :----: | :----: |
| Create / edit / delete teams          |       ✔       |   Can only edit and delete teams the are the owner of   |    ❌   |    ❌   |
| Give access to farms and compartments |       ✔       | Can only add farms and compartments they have access to |    ❌   |    ❌   |

### Crop Cycle/Timeline

| Task                 | Administrator | Manager |     Grower     | Viewer |
| :------------------- | :-----------: | :-----: | :------------: | :----: |
| Create post          |       ✔       |    ✔    |        ✔       |    ❌   |
| Delete post          |       ✔       |    ✔    | Only own posts |    ❌   |
| Edit post            |       ✔       |    v    | Only own posts |    ❌   |
| Tag/mention users    |       ✔       |    ✔    |        ✔       |    ✔   |
| Create yield  record |       ✔       |    ✔    |        ✔       |    ❌   |
| Delete yield record  |       ✔       |    ✔    |        ✔       |    ❌   |
| Edit yield record    |       ✔       |    ✔    |        ✔       |    ❌   |
| Start crop cycle     |       ✔       |    ✔    |        ✔       |    ❌   |

## Users

| Task                         | Administrator | Manager                                              | Grower | Viewer |
| :--------------------------- | :------------ | :--------------------------------------------------- | :----- | :----- |
| Create / edit / delete teams | ✔             | ✔                                                    | ❌      | ❌      |
| Delete users                 | ✔             | Can only delete managers, growers and viewers        | ❌      | ❌      |
| Edit user roles              | ✔             | Can only edit roles of managers, growers and viewers | ❌      | ❌      |
| Invite users                 | ✔             | Can only invite managers, growers and viewers        | ❌      | ❌      |
