Migrate to stateless app.App (#17542)
* add request context * move initialialization to server * use app interface instead of global app functions * remove app context from webconn * cleanup * remove duplicated services * move context to separate package * remove finalize init method and move content to NewServer function * restart workers and schedulers after adding license for tests * reflect review comments Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
c09369f14a
Коммит
5ea06e51d0
@@ -4,11 +4,12 @@
|
||||
package einterfaces
|
||||
|
||||
import (
|
||||
"github.com/mattermost/mattermost-server/v5/app/request"
|
||||
"github.com/mattermost/mattermost-server/v5/model"
|
||||
)
|
||||
|
||||
type LdapInterface interface {
|
||||
DoLogin(id string, password string) (*model.User, *model.AppError)
|
||||
DoLogin(c *request.Context, id string, password string) (*model.User, *model.AppError)
|
||||
GetUser(id string) (*model.User, *model.AppError)
|
||||
GetUserAttributes(id string, attributes []string) (map[string]string, *model.AppError)
|
||||
CheckPassword(id string, password string) *model.AppError
|
||||
@@ -21,7 +22,7 @@ type LdapInterface interface {
|
||||
MigrateIDAttribute(toAttribute string) error
|
||||
GetGroup(groupUID string) (*model.Group, *model.AppError)
|
||||
GetAllGroupsPage(page int, perPage int, opts model.LdapGroupSearchOpts) ([]*model.Group, int, *model.AppError)
|
||||
FirstLoginSync(user *model.User, userAuthService, userAuthData, email string) *model.AppError
|
||||
FirstLoginSync(c *request.Context, user *model.User, userAuthService, userAuthData, email string) *model.AppError
|
||||
UpdateProfilePictureIfNecessary(model.User, model.Session)
|
||||
GetADLdapIdFromSAMLId(authData string) string
|
||||
GetSAMLIdFromADLdapId(authData string) string
|
||||
|
||||
Ссылка в новой задаче
Block a user