dashboard acl

This commit is contained in:
Torkel Ödegaard 2017-06-21 14:19:08 -04:00
parent fcc8557dbb
commit 48305b5789
2 changed files with 3 additions and 4 deletions

View File

@ -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",

View File

@ -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).