Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
00686833
Unverified
Commit
00686833
authored
Nov 18, 2020
by
Arve Knudsen
Committed by
GitHub
Nov 18, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Backend: Fix build (#29206)
* Backend: Fix build Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
parent
2939caf9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
pkg/api/dashboard_permission.go
+1
-1
pkg/api/dashboard_permission_test.go
+2
-2
pkg/api/folder_permission_test.go
+2
-2
No files found.
pkg/api/dashboard_permission.go
View file @
00686833
...
...
@@ -100,7 +100,7 @@ func UpdateDashboardPermissions(c *models.ReqContext, apiCmd dtos.UpdateDashboar
func
validatePermissionsUpdate
(
apiCmd
dtos
.
UpdateDashboardAclCommand
)
error
{
for
_
,
item
:=
range
apiCmd
.
Items
{
if
(
item
.
UserI
d
>
0
||
item
.
TeamId
>
0
)
&&
item
.
Role
!=
nil
{
if
(
item
.
UserI
D
>
0
||
item
.
TeamID
>
0
)
&&
item
.
Role
!=
nil
{
return
models
.
ErrPermissionsWithRoleNotAllowed
}
}
...
...
pkg/api/dashboard_permission_test.go
View file @
00686833
...
...
@@ -171,12 +171,12 @@ func TestDashboardPermissionAPIEndpoint(t *testing.T) {
cmds
:=
[]
dtos
.
UpdateDashboardAclCommand
{
{
Items
:
[]
dtos
.
DashboardAclUpdateItem
{
{
UserI
d
:
1000
,
Permission
:
models
.
PERMISSION_ADMIN
,
Role
:
&
role
},
{
UserI
D
:
1000
,
Permission
:
models
.
PERMISSION_ADMIN
,
Role
:
&
role
},
},
},
{
Items
:
[]
dtos
.
DashboardAclUpdateItem
{
{
TeamI
d
:
1000
,
Permission
:
models
.
PERMISSION_ADMIN
,
Role
:
&
role
},
{
TeamI
D
:
1000
,
Permission
:
models
.
PERMISSION_ADMIN
,
Role
:
&
role
},
},
},
}
...
...
pkg/api/folder_permission_test.go
View file @
00686833
...
...
@@ -177,12 +177,12 @@ func TestFolderPermissionAPIEndpoint(t *testing.T) {
cmds
:=
[]
dtos
.
UpdateDashboardAclCommand
{
{
Items
:
[]
dtos
.
DashboardAclUpdateItem
{
{
UserI
d
:
1000
,
Permission
:
models
.
PERMISSION_ADMIN
,
Role
:
&
role
},
{
UserI
D
:
1000
,
Permission
:
models
.
PERMISSION_ADMIN
,
Role
:
&
role
},
},
},
{
Items
:
[]
dtos
.
DashboardAclUpdateItem
{
{
TeamI
d
:
1000
,
Permission
:
models
.
PERMISSION_ADMIN
,
Role
:
&
role
},
{
TeamI
D
:
1000
,
Permission
:
models
.
PERMISSION_ADMIN
,
Role
:
&
role
},
},
},
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment