Add built-in plugin for getting LDAP attributes (#7317)

Этот коммит содержится в:
Joram Wilander
2017-09-01 14:28:15 -04:00
коммит произвёл GitHub
родитель b6456a675d
Коммит e2042c4b65
5 изменённых файлов: 156 добавлений и 1 удалений

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

@@ -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
}