2017-04-12 08:27:57 -04:00
|
|
|
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
2019-11-29 06:59:40 -05:00
|
|
|
// See LICENSE.txt for license information.
|
2015-12-08 13:38:43 -05:00
|
|
|
|
|
|
|
|
package einterfaces
|
|
|
|
|
|
|
|
|
|
import (
|
2023-06-11 01:24:35 -04:00
|
|
|
"github.com/mattermost/mattermost/server/public/model"
|
2023-09-05 03:47:30 -04:00
|
|
|
"github.com/mattermost/mattermost/server/public/shared/request"
|
2015-12-08 13:38:43 -05:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
type LdapInterface interface {
|
2025-09-10 09:11:32 -04:00
|
|
|
DoLogin(rctx request.CTX, id string, password string) (*model.User, *model.AppError)
|
|
|
|
|
GetUser(rctx request.CTX, id string) (*model.User, *model.AppError)
|
2025-04-17 08:06:23 -04:00
|
|
|
GetLDAPUserForMMUser(rctx request.CTX, mmUser *model.User) (*model.User, string, *model.AppError)
|
2023-11-03 03:06:16 -04:00
|
|
|
GetUserAttributes(rctx request.CTX, id string, attributes []string) (map[string]string, *model.AppError)
|
2025-09-10 09:11:32 -04:00
|
|
|
CheckProviderAttributes(rctx request.CTX, LS *model.LdapSettings, ouser *model.User, patch *model.UserPatch) string
|
|
|
|
|
SwitchToLdap(rctx request.CTX, userID, ldapID, ldapPassword string) *model.AppError
|
|
|
|
|
StartSynchronizeJob(rctx request.CTX, waitForJobToFinish bool) (*model.Job, *model.AppError)
|
|
|
|
|
GetAllLdapUsers(rctx request.CTX) ([]*model.User, *model.AppError)
|
|
|
|
|
MigrateIDAttribute(rctx request.CTX, toAttribute string) error
|
2023-11-03 03:06:16 -04:00
|
|
|
GetGroup(rctx request.CTX, groupUID string) (*model.Group, *model.AppError)
|
|
|
|
|
GetAllGroupsPage(rctx request.CTX, page int, perPage int, opts model.LdapGroupSearchOpts) ([]*model.Group, int, *model.AppError)
|
2025-09-10 09:11:32 -04:00
|
|
|
FirstLoginSync(rctx request.CTX, user *model.User) *model.AppError
|
2023-10-30 11:33:37 -04:00
|
|
|
UpdateProfilePictureIfNecessary(request.CTX, model.User, model.Session)
|
2025-01-13 14:23:09 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type LdapDiagnosticInterface interface {
|
|
|
|
|
RunTest(rctx request.CTX) *model.AppError
|
2024-07-13 04:17:07 -04:00
|
|
|
GetVendorNameAndVendorVersion(rctx request.CTX) (string, string, error)
|
2025-06-16 16:19:33 -04:00
|
|
|
RunTestConnection(rctx request.CTX, settings model.LdapSettings) *model.AppError
|
|
|
|
|
RunTestDiagnostics(rctx request.CTX, testType model.LdapDiagnosticTestType, settings model.LdapSettings) ([]model.LdapDiagnosticResult, *model.AppError)
|
2015-12-08 13:38:43 -05:00
|
|
|
}
|