* MM-45120: Starts tracking team join time. Adds API to retrieve team members who joined after a given time.
* MM-45120: Updates json casing to match model.User.
* MM-45713 - change 500 error to json object
* validate possible encoding errors and follow standards
* replace normal debugging string with true string
* use bool type instead of string
Co-authored-by: Pablo Velez Vidal <pablo.velez@mattermost.com>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
This PR adds the post reminder backend work.
We add a new API endpoint via which a user can set a reminder for a post. An ephemeral message will be sent down the line to let the user know about the action. And then after the time is over, the system admin bot will send a DM message to the user about the reminder post.
* Introduced inlcude_deleted query parameter to allow admins to retrieve contents of post regardless of deletion status
* Introduced new client route and tests for getting file info of deleted posts
* Fixed tests due to caching of posts
* gofmt
* Small formatting updates
* Invalidating file infos cache on delete of post if post includes files
* Including deleted in migration flow
* Moved invalidating of cache
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
* Audit logging - new schema added, old schema removed.
* fix linter error by running goimports
* Address review comments
* Address review comments
* Example usage of new audit logging API for the updateUserAuth call
* fixed unit test on auditing updating user record
* Changed the `TestUpdateConfigDiffInAuditRecord` testcase---it failed, because this PR changes how the `meta` field is serialized into the audit log records.
* fix linter error
* use string constants for record keys
* new audit api calls for api4/bot
* `Auditable` interface implementations for model classes
* New audit calls for channel api
* New audit calls for channel_local
* renamed receivers for required style reasons
* New audit calls for api4/command
* renamed receiver
* New audit calls for api4/command_local
* renamed receiver
* fix unit test to reflect changes in the Auditable implementation of the user class
* new audit calls for compliance
* new audit calls for configs
* remove auditRec.addMeta from updateConfig and patchConfig
* new audit calls for config_local
* new audit calls
* new audit calls for ldap, license apis
* new audit calls
* new audit calls
* new audit calls
* new audit calls
* new audit calls
* new audit calls
* new audit calls
* new audit calls
* fix linter error
* fixed linter error
* fixed "user update" test
* Don't include all of config when audit logging config changes. Also fix unit test on TestUpdateConfigDiffInAuditRecord
* address review comments
* Added Auditable() method for UserPatch
* Fix duplicative method declaration from merge
* Fix styling and API changes issues introduced with merge
* Fix broken test
Co-authored-by: Daniel Schalla <daniel@schalla.me>
* Audit logging - new schema added, old schema removed.
* fix linter error by running goimports
* Address review comments
* Address review comments
* Example usage of new audit logging API for the updateUserAuth call
* fixed unit test on auditing updating user record
* Changed the `TestUpdateConfigDiffInAuditRecord` testcase---it failed, because this PR changes how the `meta` field is serialized into the audit log records.
* fix linter error
* MM-45174 - split validate business email logic
* remove unnecessary interface method
* check for error just after the cloud call to prevent server panic
Co-authored-by: Pablo Velez Vidal <pablo.velez@mattermost.com>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
We create two new auth checks which take multiple channels
and teams. They can be used to check whenever a user needs
access to multiple entities.
These are then access in dataloaders to ease the load in the
database.
```release-note
NONE
```
* Denormalize Reactions to add ChannelId for top reactions insights query
* Remove hardcoded timestamps
* Fix store, api4 tests for reactions
* Fix tests
* Fix integrity tests, allow reaction to have ChannelId populated before calling store function
* Lint fixes
* Add ChannelId field to BulkGetForPosts, Delete store handlers
* Add index to mysql migration, add not null characteristic without a separate command
* Select channelId instead of fetching post via store.GetPost, add if exists to drop column
* Make updating of Reactions conditional to support pre-migration
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
* Add new Job to keep updating the last_accessible_post time
* Filter out posts for funcs returning PostList model
* Separate methods to get and compute cache
* filter pinned posts
* For posts with sorted CreateAt order, support a faster form of filtering.
* Add inaccessible header for getPost and getPostsByIDs APIs
* replace manual binary search with the std. library
* in-place filter posts
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Nathaniel Allred <neallred@protonmail.com>
* [MM-43649] - Ability for end users to notify admin to upgrade workspace
* add test case
* move code to app layer
* feedback impl
* feedback impl-1
* feedback impl
* simplify logic
* fix typo and lint
* fix app layers
* Use a single critical section for users notified admin (#20488)
* Use a single critical section for users notifying admin
* change persistence mechanism
* add more tests
* change bot message
* fix translations
* update logic to notify once within cooloff period
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Nathaniel Allred <neallred@protonmail.com>
* handle all JSON marshal errors in model/client4.go
* handle a JSON marshal error in model/client4.go at line 4162
* declare jsonErr at L4162 before use
* change email *ValidateBusinessEmailRequest to email *StartCloudTrialRequest at L7866 to keep up with updated master branch
* MM-44509 - subscription change not reflected after trial
* fix the tests
* receive the subscription id as param, defer the cache invalidation
* validate business email with body request
* update api request to accept json body payload
* fix unit tests
* fix tests after merge conflict fixes
Co-authored-by: Pablo Velez Vidal <pablo.velez@mattermost.com>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>