Backend: Rename variables for style conformance (#29097)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
This commit is contained in:
@@ -7,15 +7,15 @@ import (
|
||||
"github.com/grafana/grafana/pkg/models"
|
||||
)
|
||||
|
||||
func MakeUserAdmin(bus bus.Bus, orgId int64, userId int64, dashboardId int64, setViewAndEditPermissions bool) error {
|
||||
func MakeUserAdmin(bus bus.Bus, orgID int64, userID int64, dashboardID int64, setViewAndEditPermissions bool) error {
|
||||
rtEditor := models.ROLE_EDITOR
|
||||
rtViewer := models.ROLE_VIEWER
|
||||
|
||||
items := []*models.DashboardAcl{
|
||||
{
|
||||
OrgId: orgId,
|
||||
DashboardId: dashboardId,
|
||||
UserId: userId,
|
||||
OrgID: orgID,
|
||||
DashboardID: dashboardID,
|
||||
UserID: userID,
|
||||
Permission: models.PERMISSION_ADMIN,
|
||||
Created: time.Now(),
|
||||
Updated: time.Now(),
|
||||
@@ -25,16 +25,16 @@ func MakeUserAdmin(bus bus.Bus, orgId int64, userId int64, dashboardId int64, se
|
||||
if setViewAndEditPermissions {
|
||||
items = append(items,
|
||||
&models.DashboardAcl{
|
||||
OrgId: orgId,
|
||||
DashboardId: dashboardId,
|
||||
OrgID: orgID,
|
||||
DashboardID: dashboardID,
|
||||
Role: &rtEditor,
|
||||
Permission: models.PERMISSION_EDIT,
|
||||
Created: time.Now(),
|
||||
Updated: time.Now(),
|
||||
},
|
||||
&models.DashboardAcl{
|
||||
OrgId: orgId,
|
||||
DashboardId: dashboardId,
|
||||
OrgID: orgID,
|
||||
DashboardID: dashboardID,
|
||||
Role: &rtViewer,
|
||||
Permission: models.PERMISSION_VIEW,
|
||||
Created: time.Now(),
|
||||
@@ -44,7 +44,7 @@ func MakeUserAdmin(bus bus.Bus, orgId int64, userId int64, dashboardId int64, se
|
||||
}
|
||||
|
||||
aclCmd := &models.UpdateDashboardAclCommand{
|
||||
DashboardId: dashboardId,
|
||||
DashboardID: dashboardID,
|
||||
Items: items,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user