fyi. opensocial. putRole
Create or update a role and its grant. Requires group.configure.
- Kind
- A method (procedure)
- Part of
- The reference host
- Record
at://did:plc:2gqnilpksz2e7faj3bwvo6qc/com.atproto.lexicon.schema/fyi.opensocial.putRole
main procedure
Input
Encoding: application/json
| Field | Type | Description |
|---|---|---|
actions (required) | array of fyi. | What the role may do. Written as the scopes that grant each, beside any other scope the role already holds. |
assignable | array of string
| |
bot | boolean | Whether people with this role are bots: accounts that act on their own, not a person. Giving someone a bot role is how they are marked as one. |
default | boolean | Whether members get this role when they join. Omitted keeps the role's current value. |
description | string | |
group (required) | string (did) | The group DID. Every method is served by the group's host and authorized against that group's roles. |
name (required) | string | What the role is called. Written as the role record's displayName. |
repoCollections | array of string | Collections holders may write in the group's public repo as the group, `*` for any; written as `repo:` scopes. Omitted keeps the role's current value. |
role (required) | string
|
Output
Encoding: application/json
| Field | Type | Description |
|---|---|---|
cid (required) | string (cid) | |
uri (required) | string (at-uri) |
The schema as published
{
"defs": {
"main": {
"description": "Create or update a role and its grant. Requires group.configure.",
"input": {
"encoding": "application/json",
"schema": {
"properties": {
"actions": {
"description": "What the role may do. Written as the scopes that grant each, beside any other scope the role already holds.",
"items": {
"ref": "fyi.opensocial.defs#action",
"type": "ref"
},
"type": "array"
},
"assignable": {
"items": {
"maxLength": 64,
"type": "string"
},
"type": "array"
},
"bot": {
"description": "Whether people with this role are bots: accounts that act on their own, not a person. Giving someone a bot role is how they are marked as one.",
"type": "boolean"
},
"default": {
"description": "Whether members get this role when they join. Omitted keeps the role's current value.",
"type": "boolean"
},
"description": {
"type": "string"
},
"group": {
"description": "The group DID. Every method is served by the group's host and authorized against that group's roles.",
"format": "did",
"type": "string"
},
"name": {
"description": "What the role is called. Written as the role record's displayName.",
"type": "string"
},
"repoCollections": {
"description": "Collections holders may write in the group's public repo as the group, `*` for any; written as `repo:` scopes. Omitted keeps the role's current value.",
"items": {
"type": "string"
},
"type": "array"
},
"role": {
"maxLength": 64,
"type": "string"
}
},
"required": [
"group",
"role",
"name",
"actions"
],
"type": "object"
}
},
"output": {
"encoding": "application/json",
"schema": {
"properties": {
"cid": {
"format": "cid",
"type": "string"
},
"uri": {
"format": "at-uri",
"type": "string"
}
},
"required": [
"uri",
"cid"
],
"type": "object"
}
},
"type": "procedure"
}
},
"id": "fyi.opensocial.putRole",
"lexicon": 1
}