mirror of
https://github.com/grafana/grafana.git
synced 2025-02-16 18:34:52 -06:00
dashboard acl
This commit is contained in:
parent
fcc8557dbb
commit
48305b5789
@ -8,7 +8,6 @@ import (
|
||||
type PermissionType int
|
||||
|
||||
const (
|
||||
PERMISSION_NONE = 0
|
||||
PERMISSION_VIEW PermissionType = 1 << iota
|
||||
PERMISSION_EDIT
|
||||
PERMISSION_ADMIN
|
||||
@ -16,7 +15,6 @@ const (
|
||||
|
||||
func (p PermissionType) String() string {
|
||||
names := map[int]string{
|
||||
int(PERMISSION_NONE): "None",
|
||||
int(PERMISSION_VIEW): "View",
|
||||
int(PERMISSION_EDIT): "Edit",
|
||||
int(PERMISSION_ADMIN): "Admin",
|
||||
|
@ -35,13 +35,14 @@ INSERT INTO dashboard_acl
|
||||
(
|
||||
org_id,
|
||||
dashboard_id,
|
||||
permission,
|
||||
role,
|
||||
created,
|
||||
updated
|
||||
)
|
||||
VALUES
|
||||
(-1,-1,'Viewer','2017-06-20','2017-06-20'),
|
||||
(-1,-1,'Editor','2017-06-20','2017-06-20')
|
||||
(-1,-1, 1,'Viewer','2017-06-20','2017-06-20'),
|
||||
(-1,-1, 2,'Editor','2017-06-20','2017-06-20')
|
||||
`
|
||||
|
||||
mg.AddMigration("save default acl rules in dashboard_acl table", new(RawSqlMigration).
|
||||
|
Loading…
Reference in New Issue
Block a user