MM-22273 New auditing system (phase 1) (#13967)

* New auditing API outputting to syslog via TLS

* New config section for specifying remote syslog server IP, port, and cert.

* Legacy audit API retained for access history feature
Этот коммит содержится в:
Doug Lauder
2020-03-12 15:50:21 -04:00
коммит произвёл GitHub
родитель bd1e7f2265
Коммит 4ac0619c90
156 изменённых файлов: 16991 добавлений и 49 удалений

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

@@ -5,6 +5,7 @@ package model
import (
"encoding/json"
"fmt"
"io"
"net/http"
"strings"
@@ -89,6 +90,10 @@ func EmailInviteWithErrorToJson(o []*EmailInviteWithError) string {
}
}
func EmailInviteWithErrorToString(o *EmailInviteWithError) string {
return fmt.Sprintf("%s:%s", o.Email, o.Error.Error())
}
func TeamMembersWithErrorToTeamMembers(o []*TeamMemberWithError) []*TeamMember {
var ret []*TeamMember
for _, o := range o {
@@ -107,6 +112,10 @@ func TeamMembersWithErrorToJson(o []*TeamMemberWithError) string {
}
}
func TeamMemberWithErrorToString(o *TeamMemberWithError) string {
return fmt.Sprintf("%s:%s", o.UserId, o.Error.Error())
}
func TeamMembersWithErrorFromJson(data io.Reader) []*TeamMemberWithError {
var o []*TeamMemberWithError
json.NewDecoder(data).Decode(&o)