Skip to content
This repository was archived by the owner on Jan 15, 2024. It is now read-only.

Commit 7ea66f3

Browse files
authored
Merge pull request #78 from grafana/vt/rbac_new_fields
RBAC - Add new fields for managing roles
2 parents ba5e458 + 9df18dc commit 7ea66f3

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

role.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ type Role struct {
1212
Name string `json:"name"`
1313
Description string `json:"description"`
1414
Global bool `json:"global"`
15+
Group string `json:"group"`
16+
DisplayName string `json:"string"`
17+
Hidden bool `json:"hidden"`
1518
Permissions []Permission `json:"permissions,omitempty"`
1619
}
1720

role_test.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ const (
1414
"name": "test:policy",
1515
"version": 1,
1616
"description": "Test policy description",
17+
"displayName": "test display",
18+
"group": "test group",
19+
"hidden": false,
1720
"permissions": [
1821
{
1922
"id": 6,
@@ -34,6 +37,9 @@ const (
3437
"name": "test:policy",
3538
"version": 1,
3639
"description": "Test policy description",
40+
"displayName": "test display",
41+
"group": "test group",
42+
"hidden": false,
3743
"permissions": [
3844
{
3945
"permission": "test:self",
@@ -101,6 +107,9 @@ func TestGetRole(t *testing.T) {
101107
UID: "vc3SCSsGz",
102108
Name: "test:policy",
103109
Description: "Test policy description",
110+
Group: "test group",
111+
DisplayName: "test display",
112+
Hidden: false,
104113
Permissions: []Permission{
105114
{
106115
Action: "test:self",

0 commit comments

Comments
 (0)