From 23e306bc3accd9545f877299b2a14227a8389436 Mon Sep 17 00:00:00 2001 From: Scott Bishel Date: Wed, 24 Jun 2020 10:01:31 -0600 Subject: [PATCH] add function to LdapInterface (#14761) Co-authored-by: Mattermod --- einterfaces/ldap.go | 1 + einterfaces/mocks/LdapInterface.go | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/einterfaces/ldap.go b/einterfaces/ldap.go index 53bbadfeca..6a4f9bd1d9 100644 --- a/einterfaces/ldap.go +++ b/einterfaces/ldap.go @@ -22,4 +22,5 @@ type LdapInterface interface { GetAllGroupsPage(page int, perPage int, opts model.LdapGroupSearchOpts) ([]*model.Group, int, *model.AppError) FirstLoginSync(userID, userAuthService, userAuthData, email string) *model.AppError UpdateProfilePictureIfNecessary(*model.User, *model.Session) + GetADLdapIdFromSAMLId(authData string) string } diff --git a/einterfaces/mocks/LdapInterface.go b/einterfaces/mocks/LdapInterface.go index d19815c67c..ca6bade8c5 100644 --- a/einterfaces/mocks/LdapInterface.go +++ b/einterfaces/mocks/LdapInterface.go @@ -87,6 +87,20 @@ func (_m *LdapInterface) FirstLoginSync(userID string, userAuthService string, u return r0 } +// GetADLdapIdFromSAMLId provides a mock function with given fields: authData +func (_m *LdapInterface) GetADLdapIdFromSAMLId(authData string) string { + ret := _m.Called(authData) + + var r0 string + if rf, ok := ret.Get(0).(func(string) string); ok { + r0 = rf(authData) + } else { + r0 = ret.Get(0).(string) + } + + return r0 +} + // GetAllGroupsPage provides a mock function with given fields: page, perPage, opts func (_m *LdapInterface) GetAllGroupsPage(page int, perPage int, opts model.LdapGroupSearchOpts) ([]*model.Group, int, *model.AppError) { ret := _m.Called(page, perPage, opts)