# 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.

A record in the spec for Atmosphere Groups. The page: https://www.atmospheregroups.org/spec/lexicons/org-atgrp-role/

- Named in the spec: 5 Roles & Access (https://www.atmospheregroups.org/spec/#roles--access); 7 Creating a group (https://www.atmospheregroups.org/spec/#creating-a-group); 13.2 Record types (https://www.atmospheregroups.org/spec/#record-types); 13.3 Permission sets (https://www.atmospheregroups.org/spec/#permission-sets)
- In the spec's repository: https://tangled.org/atmospheregroups.org/spec/blob/0885261c9cd1af80e89908571f926c2d0c71771f/lexicons/org/atgrp/role.json
- Published under the same name: https://www.atmospheregroups.org/reference/lexicons/org-atgrp-role/, the same schema
- The reference host's version: fyi.opensocial.role, https://www.atmospheregroups.org/reference/lexicons/fyi-opensocial-role/

## The schema in the spec

```json
{
  "lexicon": 1,
  "id": "org.atgrp.role",
  "defs": {
    "main": {
      "type": "record",
      "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": {
        "type": "object",
        "properties": {
          "displayName": {
            "type": "string",
            "maxGraphemes": 64,
            "maxLength": 640,
            "description": "Defaults to the role ID."
          },
          "description": {
            "type": "string",
            "maxGraphemes": 2000,
            "maxLength": 20000
          },
          "default": {
            "type": "boolean",
            "default": false,
            "description": "If true, granted to members admitted through requestJoin."
          },
          "permissions": {
            "type": "array",
            "maxLength": 100,
            "description": "Group-wide permissions, one per item. For permissions not tied to one space, such as manage=create, rpc: permissions, and space:* grants.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 2000
            }
          },
          "canAssign": {
            "type": "array",
            "maxLength": 100,
            "description": "Keys of roles this role may assign, or * for every role.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            }
          }
        }
      }
    }
  }
}
```
