diff options
author | Joram Wilander <jwawilander@gmail.com> | 2017-09-01 14:28:15 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-01 14:28:15 -0400 |
commit | e2042c4b6579aa367bdf764ddecbca4e1bd38772 (patch) | |
tree | dc92c71098412235cb3a582daafd395af7b9afe4 /app/plugin/api.go | |
parent | b6456a675d140d6d80eb0874a5b6a89008e28eaa (diff) | |
download | chat-e2042c4b6579aa367bdf764ddecbca4e1bd38772.tar.gz chat-e2042c4b6579aa367bdf764ddecbca4e1bd38772.tar.bz2 chat-e2042c4b6579aa367bdf764ddecbca4e1bd38772.zip |
Add built-in plugin for getting LDAP attributes (#7317)
Diffstat (limited to 'app/plugin/api.go')
-rw-r--r-- | app/plugin/api.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/plugin/api.go b/app/plugin/api.go index 41838b818..4604bf8ce 100644 --- a/app/plugin/api.go +++ b/app/plugin/api.go @@ -32,6 +32,14 @@ type API interface { // Creates a post CreatePost(post *model.Post) (*model.Post, *model.AppError) + // Get LDAP attributes for a user + GetLdapUserAttributes(userId string, attributes []string) (map[string]string, *model.AppError) + + // Temporary for built-in plugins, copied from api4/context.go ServeHTTP function. + // If a request has a valid token for an active session, the session is returned otherwise + // it errors. + GetSessionFromRequest(r *http.Request) (*model.Session, *model.AppError) + // Returns a localized string. If a request is given, its headers will be used to pick a locale. I18n(id string, r *http.Request) string } |