You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/roles.md
+67-52Lines changed: 67 additions & 52 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,33 +2,32 @@
2
2
title: Roles, Role Members, and Role Actions
3
3
---
4
4
5
-
6
-
## **Roles**
5
+
## **Roles**
7
6
8
7
A role is a collection of permissions (actions) that define what members of the role are allowed to do within a specific entity. Each entity (like a `Client`, `Channel`, `Group`, or `Domain`) can have multiple roles, each with its own members and actions.
9
8
10
-
-**Role Members**: These are users assigned to a role. Members are the only users allowed to perform the role's actions on the entity.
9
+
-**Role Members**: These are users assigned to a role. Members are the only users allowed to perform the role's actions on the entity.
11
10
-**Role Actions**: These are permissions defining what members of the role can do. For example, actions can include `read`, `update`, `delete`, or more specific actions like `publish` or `connect_to_channel`. **Refer to `authz-spec.md` for the available actions for each entity type.**
12
11
13
12
---
14
13
15
-
## **Base URL**
14
+
## **Base URL**
16
15
17
16
All API requests use the base URL:
18
-
`http://localhost/<entity_type>/<entity_id>`
17
+
`http://localhost/<entity_type>/<entity_id>`
19
18
20
19
Replace `<entity_type>` with one of the entity types (`clients`, `channels`, `groups`, `domains`) and `<entity_id>` with the ID of the specific entity.
21
20
22
21
---
23
22
24
23
### **Endpoints and Examples**
25
24
26
-
### **1. Create a Role**
25
+
### **1. Create a Role**
27
26
28
27
**POST /role**
29
-
Creates a role for the given entity.
28
+
Creates a role for the given entity.
30
29
31
-
**Request Body**:
30
+
**Request Body**:
32
31
33
32
```json
34
33
{
@@ -41,9 +40,9 @@ Creates a role for the given entity.
> If the role being modified is the built-in `admin` role, the system **will reject the request** if it would result in removing all remaining members from the role.
184
+
>
185
+
> This restriction ensures that **every domain always retains at least one administrator** to prevent orphaned domains.
186
+
187
+
**Request Body**:
177
188
178
189
```json
179
190
{
@@ -184,9 +195,9 @@ Deletes specific members from the role.
184
195
#### Delete Specific Role Members Example for a `Group`
0 commit comments