mirror of
https://github.com/grafana/grafana.git
synced 2025-08-02 16:12:27 +08:00
AccessControl: Document role display name (#40068)
* docs: role displayname * Update docs/sources/enterprise/access-control/roles.md Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com> * Update docs/sources/enterprise/access-control/roles.md Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com> * refactor: update accesscontrol based on fixed roles * update displayname text * Update docs/sources/enterprise/access-control/roles.md Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com> * updated group Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com> Co-authored-by: eleijonmarck <eleijonmarck@Erics-MBP.home>
This commit is contained in:
@ -97,16 +97,14 @@ Content-Type: application/json; charset=UTF-8
|
||||
|
||||
Get a role for the given UID.
|
||||
|
||||
#### Required permissions
|
||||
|
||||
| Action | Scope |
|
||||
| ---------- | -------- |
|
||||
| roles:read | roles:\* |
|
||||
|
||||
#### Example request
|
||||
|
||||
```http
|
||||
GET /api/access-control/roles/PYnDO3rMk
|
||||
#### Required permissions
|
||||
|
||||
| Action | Scope |
|
||||
| ---------- | -------- |
|
||||
| roles:read | roles:\* |
|
||||
|
||||
#### Example request
|
||||
|
||||
```http
|
||||
GET /api/access-control/roles/PYnDO3rMk
|
||||
Accept: application/json
|
||||
@ -235,6 +233,7 @@ Content-Type: application/json
|
||||
"description": "My custom role which gives users permissions to delete and write roles",
|
||||
"group":"My Group",
|
||||
"displayName": "My Custom Role",
|
||||
"global": false,
|
||||
"permissions": [
|
||||
{
|
||||
"action": "roles:delete",
|
||||
@ -278,6 +277,7 @@ Content-Type: application/json; charset=UTF-8
|
||||
|
||||
| Code | Description |
|
||||
| ---- | ---------------------------------------------------------------------------------- |
|
||||
| 200 | Role is updated. |
|
||||
| 400 | Bad request (invalid json, missing content-type, missing or invalid fields, etc.). |
|
||||
| 403 | Access denied |
|
||||
| 404 | Role was not found to update. |
|
||||
@ -329,6 +329,7 @@ Content-Type: application/json
|
||||
| 500 | Unexpected error. Refer to body and/or server logs for more details. |
|
||||
|
||||
## Create and remove user role assignments
|
||||
|
||||
### List roles assigned to a user
|
||||
|
||||
`GET /api/access-control/users/:userId/roles`
|
||||
@ -374,6 +375,7 @@ Content-Type: application/json; charset=UTF-8
|
||||
|
||||
| Action | Scope |
|
||||
| ---------------------- | -------------------- |
|
||||
| users.permissions:list | users:id:`<user ID>` |
|
||||
|
||||
#### Example request
|
||||
|
||||
@ -759,18 +761,20 @@ Content-Type: application/json; charset=UTF-8
|
||||
{
|
||||
"version": 1,
|
||||
"uid": "qQui_LCMk",
|
||||
"name": "fixed:users:org:edit",
|
||||
"description": "",
|
||||
"global": false,
|
||||
"name": "fixed:users:writer",
|
||||
"name": "User writer",
|
||||
"description": "Read and update all attributes and settings for all users in Grafana: update user information, read user information, create or enable or disable a user, make a user a Grafana administrator, sign out a user, update a user’s authentication token, or update quotas for all users",
|
||||
"global": true,
|
||||
"updated": "2021-05-13T16:24:26+02:00",
|
||||
"created": "2021-05-13T16:24:26+02:00"
|
||||
},
|
||||
{
|
||||
"version": 1,
|
||||
"uid": "PeXmlYjMk",
|
||||
"name": "fixed:users:org:read",
|
||||
"description": "",
|
||||
"global": false,
|
||||
"name": "fixed:users:reader",
|
||||
"displayName": "User reader",
|
||||
"description": "Allows every read action for user organizations and in addition allows to administer user organizations",
|
||||
"global": true,
|
||||
"updated": "2021-05-13T16:24:26+02:00",
|
||||
"created": "2021-05-13T16:24:26+02:00"
|
||||
}
|
||||
@ -779,9 +783,10 @@ Content-Type: application/json; charset=UTF-8
|
||||
{
|
||||
"version": 1,
|
||||
"uid": "qQui_LCMk",
|
||||
"name": "fixed:users:org:edit",
|
||||
"description": "",
|
||||
"global": false,
|
||||
"name": "fixed:users:writer",
|
||||
"displayName": "User writer",
|
||||
"description": "Read and update all attributes and settings for all users in Grafana: update user information, read user information, create or enable or disable a user, make a user a Grafana administrator, sign out a user, update a user’s authentication token, or update quotas for all users",
|
||||
"global": true,
|
||||
"updated": "2021-05-13T16:24:26+02:00",
|
||||
"created": "2021-05-13T16:24:26+02:00"
|
||||
}
|
||||
|
Reference in New Issue
Block a user