# social.colibri.beta.role

> Published by [colibri.social](https://lexicon.garden/identity/did:plc:mprdjqjluoswa7awzggaggj3)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:mprdjqjluoswa7awzggaggj3/social.colibri.beta.role)
- [Documentation](https://lexicon.garden/lexicon/did:plc:mprdjqjluoswa7awzggaggj3/social.colibri.beta.role/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:mprdjqjluoswa7awzggaggj3/social.colibri.beta.role/examples)

## Definitions

### `social.colibri.beta.role`

**Type**: `record`

A named bundle of permissions assignable to community members.

**Key**: `tid`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `name` | `string` | Yes | Display name. |
| `color` | `string` | No | Hex colour as #rrggbb. |
| `hoisted` | `boolean` | No | Whether holders are listed separately in the member list. |
| `position` | `integer` | Yes | Hierarchy position. Higher outranks lower. |
| `protected` | `boolean` | No | Whether this role is exempt from modification and deletion. Set on the owner role created with the community. |
| `mentionable` | `boolean` | No | Whether @role mentions resolve to this role. |
| `permissions` | `array` | Yes | Permissions granted by this role. |
| `channelOverrides` | `array` | No | Per-channel permission overrides. |

### `social.colibri.beta.role#channelOverride`

**Type**: `object`

Allow and deny lists scoped to a single channel.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `deny` | `array` | No | Permissions denied within this channel. Deny beats both the base permissions and allow. |
| `allow` | `array` | No | Permissions granted within this channel. |
| `channel` | `string` (record-key) | Yes | The space key of the channel this override applies to. |

## Raw Schema

```json
{
  "id": "social.colibri.beta.role",
  "defs": {
    "main": {
      "key": "tid",
      "type": "record",
      "record": {
        "type": "object",
        "required": [
          "name",
          "permissions",
          "position"
        ],
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 32,
            "minLength": 1,
            "description": "Display name."
          },
          "color": {
            "type": "string",
            "maxLength": 7,
            "description": "Hex colour as #rrggbb."
          },
          "hoisted": {
            "type": "boolean",
            "default": false,
            "description": "Whether holders are listed separately in the member list."
          },
          "position": {
            "type": "integer",
            "description": "Hierarchy position. Higher outranks lower."
          },
          "protected": {
            "type": "boolean",
            "default": false,
            "description": "Whether this role is exempt from modification and deletion. Set on the owner role created with the community."
          },
          "mentionable": {
            "type": "boolean",
            "default": false,
            "description": "Whether @role mentions resolve to this role."
          },
          "permissions": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "A namespaced permission identifier."
            },
            "description": "Permissions granted by this role."
          },
          "channelOverrides": {
            "type": "array",
            "items": {
              "ref": "#channelOverride",
              "type": "ref"
            },
            "description": "Per-channel permission overrides."
          }
        }
      },
      "description": "A named bundle of permissions assignable to community members."
    },
    "channelOverride": {
      "type": "object",
      "required": [
        "channel"
      ],
      "properties": {
        "deny": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Permissions denied within this channel. Deny beats both the base permissions and allow."
        },
        "allow": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Permissions granted within this channel."
        },
        "channel": {
          "type": "string",
          "format": "record-key",
          "description": "The space key of the channel this override applies to."
        }
      },
      "description": "Allow and deny lists scoped to a single channel."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
