Commit 48305b57 by Torkel Ödegaard

dashboard acl

parent fcc8557d
...@@ -8,7 +8,6 @@ import ( ...@@ -8,7 +8,6 @@ import (
type PermissionType int type PermissionType int
const ( const (
PERMISSION_NONE = 0
PERMISSION_VIEW PermissionType = 1 << iota PERMISSION_VIEW PermissionType = 1 << iota
PERMISSION_EDIT PERMISSION_EDIT
PERMISSION_ADMIN PERMISSION_ADMIN
...@@ -16,7 +15,6 @@ const ( ...@@ -16,7 +15,6 @@ const (
func (p PermissionType) String() string { func (p PermissionType) String() string {
names := map[int]string{ names := map[int]string{
int(PERMISSION_NONE): "None",
int(PERMISSION_VIEW): "View", int(PERMISSION_VIEW): "View",
int(PERMISSION_EDIT): "Edit", int(PERMISSION_EDIT): "Edit",
int(PERMISSION_ADMIN): "Admin", int(PERMISSION_ADMIN): "Admin",
......
...@@ -35,13 +35,14 @@ INSERT INTO dashboard_acl ...@@ -35,13 +35,14 @@ INSERT INTO dashboard_acl
( (
org_id, org_id,
dashboard_id, dashboard_id,
permission,
role, role,
created, created,
updated updated
) )
VALUES VALUES
(-1,-1,'Viewer','2017-06-20','2017-06-20'), (-1,-1, 1,'Viewer','2017-06-20','2017-06-20'),
(-1,-1,'Editor','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). mg.AddMigration("save default acl rules in dashboard_acl table", new(RawSqlMigration).
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment