Extract search users functions into a service (#39002) (#39770)

* 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

(cherry picked from commit 02702eb82d)
This commit is contained in:
Selene
2021-09-29 17:02:58 +02:00
committed by GitHub
parent 4699620e23
commit d07ed05918
11 changed files with 139 additions and 69 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(