# computer.localnetwork.staff.role

> A staff role, keyed by the subject DID. Written only by the root account into the staff space.

- Kind: record
- Record key: any
- Authority: staff.localnetwork.computer
- Lexicon: 1
- Published by [localnetwork.computer](https://lexicon.garden/identity/did:plc:d42l64gsczg6qh2vo243xv5l), not the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:d42l64gsczg6qh2vo243xv5l/computer.localnetwork.staff.role)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:d42l64gsczg6qh2vo243xv5l/computer.localnetwork.staff.role/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:d42l64gsczg6qh2vo243xv5l/computer.localnetwork.staff.role/analytics)

## Record (`computer.localnetwork.staff.role`)

Type: record · key any

### Properties

- `createdAt` (string · datetime, required)
- `grantedBy` (string · did, required)
- `grants` (array): Extra powers a moderator holds. Admins have them all.
  - Constraints: maxLength: 8
  - `items` (string)
    - Constraints: maxLength: 32, knownValues: flags | flagGroups
- `note` (string)
  - Constraints: maxLength: 3000, maxGraphemes: 300
- `role` (string, required)
  - Constraints: maxLength: 32, knownValues: admin | moderator
- `subject` (string · did, required)

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "A staff role, keyed by the subject DID. Written only by the root account into the staff space.",
      "key": "any",
      "record": {
        "properties": {
          "createdAt": {
            "format": "datetime",
            "type": "string"
          },
          "grantedBy": {
            "format": "did",
            "type": "string"
          },
          "grants": {
            "description": "Extra powers a moderator holds. Admins have them all.",
            "items": {
              "knownValues": [
                "flags",
                "flagGroups"
              ],
              "maxLength": 32,
              "type": "string"
            },
            "maxLength": 8,
            "type": "array"
          },
          "note": {
            "maxGraphemes": 300,
            "maxLength": 3000,
            "type": "string"
          },
          "role": {
            "knownValues": [
              "admin",
              "moderator"
            ],
            "maxLength": 32,
            "type": "string"
          },
          "subject": {
            "format": "did",
            "type": "string"
          }
        },
        "required": [
          "subject",
          "role",
          "grantedBy",
          "createdAt"
        ],
        "type": "object"
      },
      "type": "record"
    }
  },
  "id": "computer.localnetwork.staff.role",
  "lexicon": 1
}
```
