# social.colibri.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.role)
- [Documentation](https://lexicon.garden/lexicon/did:plc:mprdjqjluoswa7awzggaggj3/social.colibri.role/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:mprdjqjluoswa7awzggaggj3/social.colibri.role/examples)

## Definitions

### `social.colibri.role`

**Type**: `record`

A named bundle of permissions assignable to community members. Lives on the community repo.

**Key**: `tid`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `name` | `string` | Yes | Display name of the role. |
| `$type` | `string` (nsid) | No | The type of the record. |
| `color` | `string` | No | Optional hex color displayed alongside the role (e.g. '#ff8800'). |
| `hoisted` | `boolean` | No | Whether members of this role are displayed separately in the member list. |
| `position` | `integer` | Yes | Hierarchy position. Higher values sit higher in the role hierarchy and outrank lower values. |
| `protected` | `boolean` | No | Whether this role is protected from modification or deletion. Set true for system-managed roles (e.g. the bootstrap 'Owner' role minted by `community.create`). |
| `mentionable` | `boolean` | No | Whether `@role`-style mentions resolve to this role. |
| `permissions` | `array` | Yes | Permission identifiers granted by this role. |
| `channelOverrides` | `array` | No | Per-channel permission overrides for this role. |

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

**Type**: `object`

Allow / deny lists scoped to a single channel.

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

## Raw Schema

```json
{
  "id": "social.colibri.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 of the role."
          },
          "$type": {
            "type": "string",
            "format": "nsid",
            "description": "The type of the record."
          },
          "color": {
            "type": "string",
            "description": "Optional hex color displayed alongside the role (e.g. '#ff8800')."
          },
          "hoisted": {
            "type": "boolean",
            "default": false,
            "description": "Whether members of this role are displayed separately in the member list."
          },
          "position": {
            "type": "integer",
            "description": "Hierarchy position. Higher values sit higher in the role hierarchy and outrank lower values."
          },
          "protected": {
            "type": "boolean",
            "default": false,
            "description": "Whether this role is protected from modification or deletion. Set true for system-managed roles (e.g. the bootstrap 'Owner' role minted by `community.create`)."
          },
          "mentionable": {
            "type": "boolean",
            "default": false,
            "description": "Whether `@role`-style mentions resolve to this role."
          },
          "permissions": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "A namespaced permission identifier. See AppView permission catalog."
            },
            "description": "Permission identifiers granted by this role."
          },
          "channelOverrides": {
            "type": "array",
            "items": {
              "ref": "lex:social.colibri.role#channelOverride",
              "type": "ref"
            },
            "description": "Per-channel permission overrides for this role."
          }
        }
      },
      "description": "A named bundle of permissions assignable to community members. Lives on the community repo."
    },
    "channelOverride": {
      "type": "object",
      "required": [
        "channel"
      ],
      "properties": {
        "deny": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Permissions denied within this channel. Deny wins over base permissions and overrides allow."
        },
        "allow": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Permissions granted within this channel."
        },
        "channel": {
          "type": "string",
          "format": "record-key",
          "description": "The channel this override applies to."
        }
      },
      "description": "Allow / deny lists scoped to a single channel."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1,
  "revision": 2
}
```
