Add auditing to server CLI.
Also:
- simplify auditing in API layer
- reduce number of AddMeta calls
- have models serialize themselves
- more consistent field naming
* 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
* MM-21727 add an endpoint to move a command to another team
* endpoint
* mock / client
* unit tests
* MM-21727 PR feedback, addressed nits
* MM-21727 remove CommandMove base route
* MM-21272 replace TeamId struct with CommandMoveRequest struct
* MM-21727 fixed typo in CommandMoveRequest struct name
* MM-21727 return not-found for all getCommandById calls
* MM-21727 ensure no command ids leak
* when calling GetCommandById with invalid id return not_found
* when checking perms to manage commands for team return same not_found
* update unit tests to check for not_found
* MM-21727 Rename TeamIdFromCommandMoveRequestJson -> CommandMoveRequestFromJson
* MM-19250 add endpoint to retrieve command by id
* endpoint
* client
* unit tests
* MM-19250 update comment; remove redundant unit test
* MM-19250 rename GetCommand to GetCommandById
* MM-19250 don't filter on autocomplete flag
* MM-19250: require team_id when using GetCommandById
* team_id added to endpoint query string for GET
* unit test to check for mismatch teamid param and command teamid
* Revert "MM-19250: require team_id when using GetCommandById"
This reverts commit ed78e27964.
* MM-19250 don't leak existence of id when user doesn't have perms
* return 404 not_found when id not found
* return 404 not_found when id exists but user missing perms to view team
* return 404 not_found when id exists but user missing perms to manage commands
* MM-19250 fix typos in comments
Co-authored-by: mattermod <mattermod@users.noreply.github.com>
* Consistent license message for all the go files
* Fixing the last set of unconsistencies with the license headers
* Addressing PR review comments
* Fixing busy.go and busy_test.go license header
* No longer overriding specified team id for DMs/GMs, as these types of channels don't belong to a team, and doing so breaks slash commands for them
* Ensured user is on specified team in case of GM/DM, extended test suite
* Ensured that specified channel is a part of specified team
* Simplified approach to just infer team id from specified channel id to eliminate the attack vector entirely