Critical wasn't added in the StdLevels slice
and due to that mlog.Critical wasn't printing anything.
This was a complete blindspot that was missed.
We have removed all references to mlog.Critical in the codebase
and pointed Critical to be Fatal in the library.
In v8, we will remove Critical altogether.
```release-note
Servers with an encrypted key will throw an error
during startup now.
```
* Self-hosted admins can purchase licenses in-app when `ServiceSettings,SelfHostedPurchase` is true (the default)
* Content Security Policy enables loading assets from `js.stripe.com/v3` when `ServiceSettings.SelfHostedPurchase` is true (the default).
* Add `hosted_customer` API subpath
* Add status of SelfHostedPurchase to telemetry config report.
* Support showing admins self-hosted invoices when `ServiceSettings.SelfHostedPurchase` is true (the default)
Co-authored-by: Conor Macpherson <116016004+ConorMacpherson@users.noreply.github.com>
We didn't use to handle the error returned from the Enqueue
method. We fix that.
Additionally, we add a verbosity flag that can allow us to
look into verbose logs from the rudder client. This can
help us to debug issues regarding telemetry not being sent.
https://mattermost.atlassian.net/browse/MM-48651
```release-note
NONE
```
* MM-23881: global drafts endpoints and ws events
Adds endpoints:
- create/update drafts
- delete draft
- get drafts
Adds WS events:
- draft_updated
- draft_created
- draft_deleted
* Ordering and WS event name fixes
* Adds PostID to the drafts table
In the future the drafts will include edited posts, this commit adds the
post id in the combined pkey of the table.
* Fixes route for deleting a thread draft
* Fixes failed checks
* Fixes migrations
* Fixes migration
* Extract translation strings
* Removes PostID since we won't sync editing posts
* Fixes tests
* Fixes i18n
* Update migrations for global drafts
* update branch with latest master changes
* Add feature flag for global drafts
* Set global drafts feature flag default to true
* Added support for files in drafts
* Fix failing i18n check
* Added support for deleting files in drafts
* Revert "Added support for deleting files in drafts"
This reverts commit 45dfd04a760359de2e8814d652c9ef46daf994f6.
* Triggering new test server
* Add config setting 'AllowSyncedDrafts' for syncing drafts with server
* Triggering new test server
* Triggering new test server
* Add guard for config setting and add initial tests
* Fix i18n and lint errors
* Triggering new test server
* Add tests for drafts
* fix lint issues
* Add tests for model/draft
* Triggering new test server
* Triggering new test server
* Trigger new test server
* Address PR comments
* Change left join to regular join in GetDraftsForUser
* Fix broken test
Maybe consider adding an inclDeleted field if we want to get deleted drafts in the future
* fix translations
* Add store tests for drafts
* fix test naming
* remove comment
* update migrations
* set feature flag default to false
* update migrations
Co-authored-by: Mylon Suren <mylonsuren@gmail.com>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
* MM-47250: Add new system console section
We add a new section in system console
for products.
```release-note
Added a new section in system console
for products. For now, it only contains
boards specific settings.
```
* fix unit tests
```release-note
NONE
```
* change comment
```release-note
NONE
```
We were applying a white background to transparent images
and converting them to jpegs. This was to make text be legible
behind a black preview background.
However, this has led to a poor user experience, as users rarely
download the full image but always click on previews. Therefore,
we need the previews to remain as pngs.
To fix this, we just re-encode them as pngs instead of jpgs.
```release-note
NONE
```
* MM-46408: adds PostPriority feature flag
Adds the PostPriority feature flag. You can enable it by setting the
env variable `MM_FEATUREFLAGS_POSTPRIORITY=true`.
* Adds support for admin setting
* empty
* Uses post priority in telemetry
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
* Allow embedded JSON in config.json for AdvancedLoggingConfig
* fix escaped JSON case
* Add unit test cases for escaped JSON
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
For the local proxy, we weren't following redirects.
We remove the CheckRedirect function and use the default
function, which is good enough for our purposes.
https://mattermost.atlassian.net/browse/MM-40450
```release-note
NONE
```
* Improves groups membership telemetry.
* Removes unnecessary where clause (it's added by default).
* Cleans up data.
* Testing the relative group counts.
* Adds missing test mock.
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
```release-note
We create a new config option MaxImageDecoderConcurrency which
indicates how many images can be decoded concurrently at once.
The default is -1 which means number of CPUs present.
This affects the total memory consumption of the server. The
maximum memory of a single image is dictated by MaxImageResolution * 24 bytes.
Therefore, a good rule of thumb to follow is that MaxImageResolution
* MaxImageDecoderConcurrency * 24 should be less then the allocated memory for
image decoding.
```
https://mattermost.atlassian.net/browse/MM-43733
* store: guests will only receive results of which channels they are in
* api4/channel_test: add test case for guest accounts channel autocomplete
* apply to searchengine and also for AutocompleteInTeam
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
* MM-38982: fixes SVG uploading
Uploading SVG files was "almost" treated like an image in some places,
resulting in not showing the SVG on the client.
This is happening because when we fail to generate a mini preview for an
image, we prepend "invalid-" to the MimeType.
This commit adds a check to guard against SVG files in methods that make
no sense for SVGs.
* Reverts invalid-{mimetype} fix
* Uses fileInfo.IsSvg() where it can