user service: initial implementation (#17668)
* conceptual user service: initial commit * reflect review comments * fix i18n issues and some tests * implement get user methods * add license * reflect review comments
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
d320b50abb
Коммит
ac3bb2e811
@@ -57,6 +57,7 @@ import (
|
||||
"github.com/mattermost/mattermost-server/v5/services/timezones"
|
||||
"github.com/mattermost/mattermost-server/v5/services/tracing"
|
||||
"github.com/mattermost/mattermost-server/v5/services/upgrader"
|
||||
"github.com/mattermost/mattermost-server/v5/services/users"
|
||||
"github.com/mattermost/mattermost-server/v5/shared/filestore"
|
||||
"github.com/mattermost/mattermost-server/v5/shared/i18n"
|
||||
"github.com/mattermost/mattermost-server/v5/shared/mail"
|
||||
@@ -158,6 +159,7 @@ type Server struct {
|
||||
limitedClientConfig atomic.Value
|
||||
|
||||
telemetryService *telemetry.TelemetryService
|
||||
userService *users.UserService
|
||||
|
||||
serviceMux sync.RWMutex
|
||||
remoteClusterService remotecluster.RemoteClusterServiceIFace
|
||||
@@ -407,6 +409,8 @@ func NewServer(options ...Option) (*Server, error) {
|
||||
return nil, errors.Wrap(err, "cannot create store")
|
||||
}
|
||||
|
||||
s.userService = users.New(s.Store.User(), s.Config)
|
||||
|
||||
s.configListenerId = s.AddConfigListener(func(_, _ *model.Config) {
|
||||
s.configOrLicenseListener()
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user