[MM-54434] Use job.Logger to capture ldap logs (#24493)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
afaf41b587
Коммит
aad25be4e1
@@ -15,13 +15,13 @@ type LdapInterface struct {
|
||||
mock.Mock
|
||||
}
|
||||
|
||||
// CheckPassword provides a mock function with given fields: id, password
|
||||
func (_m *LdapInterface) CheckPassword(id string, password string) *model.AppError {
|
||||
ret := _m.Called(id, password)
|
||||
// CheckPassword provides a mock function with given fields: c, id, password
|
||||
func (_m *LdapInterface) CheckPassword(c *request.Context, id string, password string) *model.AppError {
|
||||
ret := _m.Called(c, id, password)
|
||||
|
||||
var r0 *model.AppError
|
||||
if rf, ok := ret.Get(0).(func(string, string) *model.AppError); ok {
|
||||
r0 = rf(id, password)
|
||||
if rf, ok := ret.Get(0).(func(*request.Context, string, string) *model.AppError); ok {
|
||||
r0 = rf(c, id, password)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*model.AppError)
|
||||
@@ -31,13 +31,13 @@ func (_m *LdapInterface) CheckPassword(id string, password string) *model.AppErr
|
||||
return r0
|
||||
}
|
||||
|
||||
// CheckPasswordAuthData provides a mock function with given fields: authData, password
|
||||
func (_m *LdapInterface) CheckPasswordAuthData(authData string, password string) *model.AppError {
|
||||
ret := _m.Called(authData, password)
|
||||
// CheckPasswordAuthData provides a mock function with given fields: c, authData, password
|
||||
func (_m *LdapInterface) CheckPasswordAuthData(c *request.Context, authData string, password string) *model.AppError {
|
||||
ret := _m.Called(c, authData, password)
|
||||
|
||||
var r0 *model.AppError
|
||||
if rf, ok := ret.Get(0).(func(string, string) *model.AppError); ok {
|
||||
r0 = rf(authData, password)
|
||||
if rf, ok := ret.Get(0).(func(*request.Context, string, string) *model.AppError); ok {
|
||||
r0 = rf(c, authData, password)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*model.AppError)
|
||||
@@ -47,13 +47,13 @@ func (_m *LdapInterface) CheckPasswordAuthData(authData string, password string)
|
||||
return r0
|
||||
}
|
||||
|
||||
// CheckProviderAttributes provides a mock function with given fields: LS, ouser, patch
|
||||
func (_m *LdapInterface) CheckProviderAttributes(LS *model.LdapSettings, ouser *model.User, patch *model.UserPatch) string {
|
||||
ret := _m.Called(LS, ouser, patch)
|
||||
// CheckProviderAttributes provides a mock function with given fields: c, LS, ouser, patch
|
||||
func (_m *LdapInterface) CheckProviderAttributes(c *request.Context, LS *model.LdapSettings, ouser *model.User, patch *model.UserPatch) string {
|
||||
ret := _m.Called(c, LS, ouser, patch)
|
||||
|
||||
var r0 string
|
||||
if rf, ok := ret.Get(0).(func(*model.LdapSettings, *model.User, *model.UserPatch) string); ok {
|
||||
r0 = rf(LS, ouser, patch)
|
||||
if rf, ok := ret.Get(0).(func(*request.Context, *model.LdapSettings, *model.User, *model.UserPatch) string); ok {
|
||||
r0 = rf(c, LS, ouser, patch)
|
||||
} else {
|
||||
r0 = ret.Get(0).(string)
|
||||
}
|
||||
@@ -105,13 +105,13 @@ func (_m *LdapInterface) FirstLoginSync(c *request.Context, user *model.User, us
|
||||
return r0
|
||||
}
|
||||
|
||||
// GetADLdapIdFromSAMLId provides a mock function with given fields: authData
|
||||
func (_m *LdapInterface) GetADLdapIdFromSAMLId(authData string) string {
|
||||
ret := _m.Called(authData)
|
||||
// GetADLdapIdFromSAMLId provides a mock function with given fields: c, authData
|
||||
func (_m *LdapInterface) GetADLdapIdFromSAMLId(c *request.Context, authData string) string {
|
||||
ret := _m.Called(c, authData)
|
||||
|
||||
var r0 string
|
||||
if rf, ok := ret.Get(0).(func(string) string); ok {
|
||||
r0 = rf(authData)
|
||||
if rf, ok := ret.Get(0).(func(*request.Context, string) string); ok {
|
||||
r0 = rf(c, authData)
|
||||
} else {
|
||||
r0 = ret.Get(0).(string)
|
||||
}
|
||||
@@ -154,25 +154,25 @@ func (_m *LdapInterface) GetAllGroupsPage(page int, perPage int, opts model.Ldap
|
||||
return r0, r1, r2
|
||||
}
|
||||
|
||||
// GetAllLdapUsers provides a mock function with given fields:
|
||||
func (_m *LdapInterface) GetAllLdapUsers() ([]*model.User, *model.AppError) {
|
||||
ret := _m.Called()
|
||||
// GetAllLdapUsers provides a mock function with given fields: c
|
||||
func (_m *LdapInterface) GetAllLdapUsers(c *request.Context) ([]*model.User, *model.AppError) {
|
||||
ret := _m.Called(c)
|
||||
|
||||
var r0 []*model.User
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(0).(func() ([]*model.User, *model.AppError)); ok {
|
||||
return rf()
|
||||
if rf, ok := ret.Get(0).(func(*request.Context) ([]*model.User, *model.AppError)); ok {
|
||||
return rf(c)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func() []*model.User); ok {
|
||||
r0 = rf()
|
||||
if rf, ok := ret.Get(0).(func(*request.Context) []*model.User); ok {
|
||||
r0 = rf(c)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]*model.User)
|
||||
}
|
||||
}
|
||||
|
||||
if rf, ok := ret.Get(1).(func() *model.AppError); ok {
|
||||
r1 = rf()
|
||||
if rf, ok := ret.Get(1).(func(*request.Context) *model.AppError); ok {
|
||||
r1 = rf(c)
|
||||
} else {
|
||||
if ret.Get(1) != nil {
|
||||
r1 = ret.Get(1).(*model.AppError)
|
||||
@@ -210,13 +210,13 @@ func (_m *LdapInterface) GetGroup(groupUID string) (*model.Group, *model.AppErro
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetSAMLIdFromADLdapId provides a mock function with given fields: authData
|
||||
func (_m *LdapInterface) GetSAMLIdFromADLdapId(authData string) string {
|
||||
ret := _m.Called(authData)
|
||||
// GetSAMLIdFromADLdapId provides a mock function with given fields: c, authData
|
||||
func (_m *LdapInterface) GetSAMLIdFromADLdapId(c *request.Context, authData string) string {
|
||||
ret := _m.Called(c, authData)
|
||||
|
||||
var r0 string
|
||||
if rf, ok := ret.Get(0).(func(string) string); ok {
|
||||
r0 = rf(authData)
|
||||
if rf, ok := ret.Get(0).(func(*request.Context, string) string); ok {
|
||||
r0 = rf(c, authData)
|
||||
} else {
|
||||
r0 = ret.Get(0).(string)
|
||||
}
|
||||
@@ -224,25 +224,25 @@ func (_m *LdapInterface) GetSAMLIdFromADLdapId(authData string) string {
|
||||
return r0
|
||||
}
|
||||
|
||||
// GetUser provides a mock function with given fields: id
|
||||
func (_m *LdapInterface) GetUser(id string) (*model.User, *model.AppError) {
|
||||
ret := _m.Called(id)
|
||||
// GetUser provides a mock function with given fields: c, id
|
||||
func (_m *LdapInterface) GetUser(c *request.Context, id string) (*model.User, *model.AppError) {
|
||||
ret := _m.Called(c, id)
|
||||
|
||||
var r0 *model.User
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(0).(func(string) (*model.User, *model.AppError)); ok {
|
||||
return rf(id)
|
||||
if rf, ok := ret.Get(0).(func(*request.Context, string) (*model.User, *model.AppError)); ok {
|
||||
return rf(c, id)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) *model.User); ok {
|
||||
r0 = rf(id)
|
||||
if rf, ok := ret.Get(0).(func(*request.Context, string) *model.User); ok {
|
||||
r0 = rf(c, id)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*model.User)
|
||||
}
|
||||
}
|
||||
|
||||
if rf, ok := ret.Get(1).(func(string) *model.AppError); ok {
|
||||
r1 = rf(id)
|
||||
if rf, ok := ret.Get(1).(func(*request.Context, string) *model.AppError); ok {
|
||||
r1 = rf(c, id)
|
||||
} else {
|
||||
if ret.Get(1) != nil {
|
||||
r1 = ret.Get(1).(*model.AppError)
|
||||
@@ -304,13 +304,13 @@ func (_m *LdapInterface) GetVendorNameAndVendorVersion() (string, string) {
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// MigrateIDAttribute provides a mock function with given fields: toAttribute
|
||||
func (_m *LdapInterface) MigrateIDAttribute(toAttribute string) error {
|
||||
ret := _m.Called(toAttribute)
|
||||
// MigrateIDAttribute provides a mock function with given fields: c, toAttribute
|
||||
func (_m *LdapInterface) MigrateIDAttribute(c *request.Context, toAttribute string) error {
|
||||
ret := _m.Called(c, toAttribute)
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(string) error); ok {
|
||||
r0 = rf(toAttribute)
|
||||
if rf, ok := ret.Get(0).(func(*request.Context, string) error); ok {
|
||||
r0 = rf(c, toAttribute)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
@@ -362,13 +362,13 @@ func (_m *LdapInterface) StartSynchronizeJob(c *request.Context, waitForJobToFin
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// SwitchToLdap provides a mock function with given fields: userID, ldapID, ldapPassword
|
||||
func (_m *LdapInterface) SwitchToLdap(userID string, ldapID string, ldapPassword string) *model.AppError {
|
||||
ret := _m.Called(userID, ldapID, ldapPassword)
|
||||
// SwitchToLdap provides a mock function with given fields: c, userID, ldapID, ldapPassword
|
||||
func (_m *LdapInterface) SwitchToLdap(c *request.Context, userID string, ldapID string, ldapPassword string) *model.AppError {
|
||||
ret := _m.Called(c, userID, ldapID, ldapPassword)
|
||||
|
||||
var r0 *model.AppError
|
||||
if rf, ok := ret.Get(0).(func(string, string, string) *model.AppError); ok {
|
||||
r0 = rf(userID, ldapID, ldapPassword)
|
||||
if rf, ok := ret.Get(0).(func(*request.Context, string, string, string) *model.AppError); ok {
|
||||
r0 = rf(c, userID, ldapID, ldapPassword)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*model.AppError)
|
||||
@@ -379,7 +379,7 @@ func (_m *LdapInterface) SwitchToLdap(userID string, ldapID string, ldapPassword
|
||||
}
|
||||
|
||||
// UpdateProfilePictureIfNecessary provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *LdapInterface) UpdateProfilePictureIfNecessary(_a0 request.CTX, _a1 model.User, _a2 model.Session) {
|
||||
func (_m *LdapInterface) UpdateProfilePictureIfNecessary(_a0 *request.Context, _a1 model.User, _a2 model.Session) {
|
||||
_m.Called(_a0, _a1, _a2)
|
||||
}
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user