RBAC: remove unused dash and folder permission logic (#68968)

remove unused HasAdmin and HasEdit permission methods
This commit is contained in:
Ieva
2023-05-24 15:33:35 +01:00
committed by GitHub
parent 4d74f75470
commit 9439649a4c
8 changed files with 27 additions and 1516 deletions
+2 -7
View File
@@ -16,20 +16,15 @@ import (
contextmodel "github.com/grafana/grafana/pkg/services/contexthandler/model"
"github.com/grafana/grafana/pkg/services/dashboards"
"github.com/grafana/grafana/pkg/services/featuremgmt"
"github.com/grafana/grafana/pkg/services/folder"
"github.com/grafana/grafana/pkg/services/login"
pref "github.com/grafana/grafana/pkg/services/preference"
"github.com/grafana/grafana/pkg/services/user"
"github.com/grafana/grafana/pkg/setting"
)
// TODO this will be removed when we remove legacy AC fallback from HasAccess method
func (hs *HTTPServer) editorInAnyFolder(c *contextmodel.ReqContext) bool {
hasEditPermissionInFoldersQuery := folder.HasEditPermissionInFoldersQuery{SignedInUser: c.SignedInUser}
hasEditPermissionInFoldersQueryResult, err := hs.DashboardService.HasEditPermissionInFolders(c.Req.Context(), &hasEditPermissionInFoldersQuery)
if err != nil {
return false
}
return hasEditPermissionInFoldersQueryResult
return false
}
func (hs *HTTPServer) setIndexViewData(c *contextmodel.ReqContext) (*dtos.IndexViewData, error) {