MM-28090 User settings api when ldap sync (#16822)

Automatic Merge
Этот коммит содержится в:
Max Erenberg
2021-03-22 14:02:16 -04:00
коммит произвёл GitHub
родитель 4aac52bced
Коммит 6a77e24adc
12 изменённых файлов: 395 добавлений и 3 удалений

Просмотреть файл

@@ -13,6 +13,7 @@ type LdapInterface interface {
GetUserAttributes(id string, attributes []string) (map[string]string, *model.AppError)
CheckPassword(id string, password string) *model.AppError
CheckPasswordAuthData(authData string, password string) *model.AppError
CheckProviderAttributes(LS *model.LdapSettings, ouser *model.User, patch *model.UserPatch) string
SwitchToLdap(userId, ldapId, ldapPassword string) *model.AppError
StartSynchronizeJob(waitForJobToFinish bool) (*model.Job, *model.AppError)
RunTest() *model.AppError

Просмотреть файл

@@ -46,6 +46,20 @@ 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)
var r0 string
if rf, ok := ret.Get(0).(func(*model.LdapSettings, *model.User, *model.UserPatch) string); ok {
r0 = rf(LS, ouser, patch)
} else {
r0 = ret.Get(0).(string)
}
return r0
}
// DoLogin provides a mock function with given fields: id, password
func (_m *LdapInterface) DoLogin(id string, password string) (*model.User, *model.AppError) {
ret := _m.Called(id, password)

Просмотреть файл

@@ -39,6 +39,20 @@ func (_m *SamlInterface) BuildRequest(relayState string) (*model.SamlAuthRequest
return r0, r1
}
// CheckProviderAttributes provides a mock function with given fields: SS, ouser, patch
func (_m *SamlInterface) CheckProviderAttributes(SS *model.SamlSettings, ouser *model.User, patch *model.UserPatch) string {
ret := _m.Called(SS, ouser, patch)
var r0 string
if rf, ok := ret.Get(0).(func(*model.SamlSettings, *model.User, *model.UserPatch) string); ok {
r0 = rf(SS, ouser, patch)
} else {
r0 = ret.Get(0).(string)
}
return r0
}
// ConfigureSP provides a mock function with given fields:
func (_m *SamlInterface) ConfigureSP() error {
ret := _m.Called()

Просмотреть файл

@@ -12,4 +12,5 @@ type SamlInterface interface {
BuildRequest(relayState string) (*model.SamlAuthRequest, *model.AppError)
DoLogin(encodedXML string, relayState map[string]string) (*model.User, *model.AppError)
GetMetadata() (string, *model.AppError)
CheckProviderAttributes(SS *model.SamlSettings, ouser *model.User, patch *model.UserPatch) string
}