From ac74066f0e4f3d62f2d4645c3fa34b88c13958d1 Mon Sep 17 00:00:00 2001 From: Chris Date: Tue, 19 Sep 2017 18:31:35 -0500 Subject: remove einterface gets (#7455) --- app/plugins.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'app/plugins.go') diff --git a/app/plugins.go b/app/plugins.go index fb8182823..86c18ce22 100644 --- a/app/plugins.go +++ b/app/plugins.go @@ -16,7 +16,6 @@ import ( l4g "github.com/alecthomas/log4go" "github.com/gorilla/mux" - "github.com/mattermost/mattermost-server/einterfaces" "github.com/mattermost/mattermost-server/model" "github.com/mattermost/mattermost-server/utils" @@ -96,8 +95,7 @@ func (api *BuiltInPluginAPI) CreatePost(post *model.Post) (*model.Post, *model.A } func (api *BuiltInPluginAPI) GetLdapUserAttributes(userId string, attributes []string) (map[string]string, *model.AppError) { - ldapInterface := einterfaces.GetLdapInterface() - if ldapInterface == nil { + if api.app.Ldap == nil { return nil, model.NewAppError("GetLdapUserAttributes", "ent.ldap.disabled.app_error", nil, "", http.StatusNotImplemented) } @@ -106,7 +104,7 @@ func (api *BuiltInPluginAPI) GetLdapUserAttributes(userId string, attributes []s return nil, err } - return ldapInterface.GetUserAttributes(*user.AuthData, attributes) + return api.app.Ldap.GetUserAttributes(*user.AuthData, attributes) } func (api *BuiltInPluginAPI) GetSessionFromRequest(r *http.Request) (*model.Session, *model.AppError) { -- cgit v1.2.3-1-g7c22