Extract search users functions into a service (#39002)

* Extract search users to a new service

* Fix wire provider

* Fix common_test and remove RouteRegister

* Remove old endpoints

* Fix test

* Add indexes to dashboards and orgs tables

* Fix lint
This commit is contained in:
Selene
2021-09-29 12:51:49 +02:00
committed by GitHub
parent 0ecf13e5a3
commit 02702eb82d
12 changed files with 148 additions and 74 deletions
-1
View File
@@ -5,7 +5,6 @@ package server
import (
"github.com/google/wire"
sdkhttpclient "github.com/grafana/grafana-plugin-sdk-go/backend/httpclient"
"github.com/grafana/grafana/pkg/api"
"github.com/grafana/grafana/pkg/api/routing"
+3
View File
@@ -18,6 +18,7 @@ import (
"github.com/grafana/grafana/pkg/services/login"
"github.com/grafana/grafana/pkg/services/login/authinfoservice"
"github.com/grafana/grafana/pkg/services/provisioning"
"github.com/grafana/grafana/pkg/services/searchusers"
"github.com/grafana/grafana/pkg/services/sqlstore/migrations"
"github.com/grafana/grafana/pkg/services/validations"
"github.com/grafana/grafana/pkg/setting"
@@ -48,6 +49,8 @@ var wireExtsBasicSet = wire.NewSet(
wire.Bind(new(login.UserProtectionService), new(*authinfoservice.OSSUserProtectionImpl)),
ossencryption.ProvideService,
wire.Bind(new(encryption.Service), new(*ossencryption.Service)),
searchusers.ProvideUsersService,
wire.Bind(new(searchusers.Service), new(*searchusers.OSSService)),
)
var wireExtsSet = wire.NewSet(