CLI: Roles
Commands to create, change, and delete a space’s roles (sets of allowed actions). Common flags that you can add to any command (--host, --json, and others) are in the CLI command reference.
| Command | Description |
|---|---|
hakocms-cli roles create |
Create a role |
hakocms-cli roles delete |
Delete a role |
hakocms-cli roles get |
Get a role |
hakocms-cli roles list |
List roles |
hakocms-cli roles update |
Change a role’s name and permissions |
hakocms-cli roles create
Section titled “hakocms-cli roles create”Create a role.
hakocms-cli roles create [OPTIONS]| Flag or argument | Description |
|---|---|
-s, --space <SLUG> |
Space. If omitted: HAKOCMS_SPACE, hakocms-cli.toml, then the one set with spaces use, in that order |
--actions <JSON> |
Actions on entries ({"default": ["read", ...], "contentTypes": {"<ID>": [...]}}). By default, nothing is allowed on anything. Use @file to read from a file, - to read from standard input |
--name <TEXT> |
Role name |
--permissions <JSON> |
Permissions on the whole space (an array of strings). Empty by default. Use @file to read from a file, - to read from standard input |
--data <JSON> |
The whole body (JSON). Use @file to read from a file, - to read from standard input. Other flags are applied on top of it |
hakocms-cli roles delete
Section titled “hakocms-cli roles delete”Delete a role.
hakocms-cli roles delete [OPTIONS] <ID>| Flag or argument | Description |
|---|---|
-s, --space <SLUG> |
Space. If omitted: HAKOCMS_SPACE, hakocms-cli.toml, then the one set with spaces use, in that order |
<ID> |
ID |
--force |
Do it without asking for confirmation |
hakocms-cli roles get
Section titled “hakocms-cli roles get”Get a role.
hakocms-cli roles get [OPTIONS] <ID>| Flag or argument | Description |
|---|---|
-s, --space <SLUG> |
Space. If omitted: HAKOCMS_SPACE, hakocms-cli.toml, then the one set with spaces use, in that order |
<ID> |
ID |
hakocms-cli roles list
Section titled “hakocms-cli roles list”List roles.
hakocms-cli roles list [OPTIONS]| Flag or argument | Description |
|---|---|
-s, --space <SLUG> |
Space. If omitted: HAKOCMS_SPACE, hakocms-cli.toml, then the one set with spaces use, in that order |
hakocms-cli roles update
Section titled “hakocms-cli roles update”Change a role’s name and permissions.
hakocms-cli roles update [OPTIONS] <ID>| Flag or argument | Description |
|---|---|
-s, --space <SLUG> |
Space. If omitted: HAKOCMS_SPACE, hakocms-cli.toml, then the one set with spaces use, in that order |
<ID> |
ID |
--actions <JSON> |
Actions on entries ({"default": ["read", ...], "contentTypes": {"<ID>": [...]}}). By default, nothing is allowed on anything. Use @file to read from a file, - to read from standard input |
--name <TEXT> |
Role name |
--permissions <JSON> |
Permissions on the whole space (an array of strings). Empty by default. Use @file to read from a file, - to read from standard input |
--data <JSON> |
The whole body (JSON). Use @file to read from a file, - to read from standard input. Other flags are applied on top of it |