# org.atgrp.role

> A group role and its group-wide grants, keyed by role ID. Role IDs follow label value syntax ([a-z-]+) and are at least 3 characters. Written by the group in the members space. Grants within a space live in that space's policy.

- Kind: record
- Record key: any
- Authority: atgrp.org
- Lexicon: 1
- Published by [lex.atgrp.org](https://lexicon.garden/identity/did:plc:4pt2cnpyvfgn5b7uxwn2shwv), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:4pt2cnpyvfgn5b7uxwn2shwv/org.atgrp.role)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:4pt2cnpyvfgn5b7uxwn2shwv/org.atgrp.role/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:4pt2cnpyvfgn5b7uxwn2shwv/org.atgrp.role/analytics)

## Record (`org.atgrp.role`)

Type: record · key any

### Properties

- `canAssign` (array): Keys of roles this role may assign, or * for every role.
  - Constraints: maxLength: 100
  - `items` (string)
    - Constraints: minLength: 1, maxLength: 512
- `default` (boolean): If true, granted to members admitted through requestJoin.
  - Constraints: default: false
- `description` (string)
  - Constraints: maxLength: 20000, maxGraphemes: 2000
- `displayName` (string): Defaults to the role ID.
  - Constraints: maxLength: 640, maxGraphemes: 64
- `permissions` (array): Group-wide permissions, one per item. For permissions not tied to one space, such as manage=create, rpc: permissions, and space:* grants.
  - Constraints: maxLength: 100
  - `items` (string)
    - Constraints: minLength: 1, maxLength: 2000

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "A group role and its group-wide grants, keyed by role ID. Role IDs follow label value syntax ([a-z-]+) and are at least 3 characters. Written by the group in the members space. Grants within a space live in that space's policy.",
      "key": "any",
      "record": {
        "properties": {
          "canAssign": {
            "description": "Keys of roles this role may assign, or * for every role.",
            "items": {
              "maxLength": 512,
              "minLength": 1,
              "type": "string"
            },
            "maxLength": 100,
            "type": "array"
          },
          "default": {
            "default": false,
            "description": "If true, granted to members admitted through requestJoin.",
            "type": "boolean"
          },
          "description": {
            "maxGraphemes": 2000,
            "maxLength": 20000,
            "type": "string"
          },
          "displayName": {
            "description": "Defaults to the role ID.",
            "maxGraphemes": 64,
            "maxLength": 640,
            "type": "string"
          },
          "permissions": {
            "description": "Group-wide permissions, one per item. For permissions not tied to one space, such as manage=create, rpc: permissions, and space:* grants.",
            "items": {
              "maxLength": 2000,
              "minLength": 1,
              "type": "string"
            },
            "maxLength": 100,
            "type": "array"
          }
        },
        "type": "object"
      },
      "type": "record"
    }
  },
  "id": "org.atgrp.role",
  "lexicon": 1
}
```
