Граф коммитов

328 Коммитов

Автор SHA1 Сообщение Дата
Nathaniel Allred
a8fa3f29e9 Self-hosted in-product purchase (#21804)
* 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>
2022-12-13 13:36:18 -06:00
Agniva De Sarker
7606fd9725 MM-48651: Log error while queuing telemetry (#21821)
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
```
2022-12-08 21:25:00 +05:30
Michael Kochell
c3c81cb3d6 MM-48120/MM-48623 Patch plugin bundle react-dom on webapp extract (#21171)
Automatic Merge
2022-12-06 19:44:48 +02:00
Nathaniel Allred
4f3f6e6496 Mm 47422 signup token (#21662)
* When service setting flag is on, self hosted workspaces can initiate process for self-serve sign up
* Add hosted_customer api.
2022-11-29 13:32:08 -06:00
Martin Kraft
98a14c8c55 gofmt fixes. (#21742) 2022-11-28 11:16:47 -05:00
Kyriakos Z
5e5769c4ee MM-45317: global drafts endpoints and ws events (#20614)
* 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>
2022-11-23 22:21:40 -05:00
Nick Misasi
a541cda9d0 Invalidate cloud caches when a new license is loaded (#21579)
Automatic Merge
2022-11-02 22:40:26 +02:00
Agniva De Sarker
5730d3da6e MM-47250: Add new system console section (#21333)
* 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
```
2022-10-19 15:23:20 -04:00
Agniva De Sarker
279c448da3 MM-36295: Do not convert thumbnails/previews to jpeg for png images (#21230)
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
```
2022-10-11 19:04:09 +05:30
emmyni
07f04b0349 Merge pull request #21175 from emmyni/MM-29625
MM-29625: Remove CloudBilling Feature Flag
2022-10-07 11:11:54 -04:00
Ben Cooke
76386df998 [MM-24461] Show last active time of users when not online (#19126)
* tools updates

* Revert "tools updates"

This reverts commit 6293297b55803c5a263e200ebd80192899666ae9.

* new config EnableLastActiveTime

Co-authored-by: Benjamin Cooke <benjamincooke@Benjamins-MacBook-Pro.local>
Co-authored-by: Benjamin Cooke <benjamincooke@Benjamins-MBP.ht.home>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-09-30 13:11:34 -04:00
Emmy Ni
e59f527f92 remove references to CloudBilling 2022-09-30 11:33:34 -04:00
Kyriakos Z
93174fbe56 MM-46408: adds PostPriority feature flag and admin setting (#20875)
* 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>
2022-09-11 20:45:20 +03:00
Doug Lauder
1d7822d154 Revert "Allow inline JSON in config.json for advanced logging config (#20954)" (#20983)
This reverts commit 5211d5de15.
2022-09-09 12:56:05 -04:00
Doug Lauder
5211d5de15 Allow inline JSON in config.json for advanced logging config (#20954)
* 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>
2022-09-09 07:51:17 -04:00
Allan Guwatudde
bd42f0cd8c [MM-45564] - Notify Admin v2 (#20777)
* [MM-45564] - Notify Admin v2

* add dummy data

* update dummy data

* add store methods

* experiment with recurring task

* complete saving of the notification

* make improvements

* make improvements

* add store layer tests

* fix lint

* update store layer tests

* add app layer unit tests

* add store layers

* add app layer tests

* fix lint

* fix lint

* fix tests

* fix tests lint

* fix lint

* fix lint

* fix retry layer test

* add notifications manual trigger

* filter notifications based on current plan

* add test case

* temp change

* feedback impl

* fix translations

* change job scheduler

* refactor job

* fix store layer tests

* extract i18n

* fix lint

* fix translations

* fix translations

* add license statement for new file

* feedback impl-2

* fix lint

* update make file

* add intl ids

* improve

* fix lint

* feedback impl

* move code and rename files

* fix lint

* feedback impl

* add config for trigger notifications api

* fix tests

* tmp change

* undo temp changes

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-09-02 13:52:48 +03:00
Tim Scheuermann
617eb98d29 MM-46455 Remove download limit (#20870)
* [MM-46455] Raise download limit and add errors for exceeding it

* [MM-46455] Report HTTP errors

* Remove download size limit

Co-authored-by: Tim Scheuermann <tim.scheuermann@mattermost.com>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-08-25 08:06:14 +02:00
Ibrahim Serdar Acikgoz
efbcb0a35a move logger under platform (#20831)
* move logger under platform
2022-08-24 10:10:56 +03:00
Tim Scheuermann
a28a967eba MM-45991 Wrap errors (#20785) 2022-08-18 11:01:37 +02:00
Tim Scheuermann
1738bd6e92 [MM-45991] Check and return JSON errors (#20735) 2022-08-10 10:56:58 +02:00
Tim Scheuermann
b4570afa90 Replace deprecated ioutil with io and os (#20776)
* Replace ioutil with io and os

* Replace ioutil in utils/file.go

* Minor fix to tests and excluded files

Co-authored-by: Tim Scheuermann <tim.scheuermann@mattermost.com>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-08-09 14:25:46 +03:00
Agniva De Sarker
f07c31c5d9 MM-45196: Migration api4/command and app/cmd to logger context (#20730)
```release-note
NONE
```

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-08-02 20:48:54 +05:30
Tim Scheuermann
eba08cbb11 Replace ioutil.Discard with io.Discard (#20707) 2022-07-27 11:40:33 +02:00
Shota Gvinepadze
638ee68935 [MM-44948] Update sync (#20414)
* Update sync

* Add enter

* Address review suggestion

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-07-21 18:11:45 +04:00
Allan Guwatudde
9e24191137 Revert "[MM-45684] - Self Managed: Add pricing modal + Upgrade button (#20653)" (#20673)
This reverts commit 01fce41bd7.
2022-07-19 10:34:24 +03:00
Allan Guwatudde
01fce41bd7 [MM-45684] - Self Managed: Add pricing modal + Upgrade button (#20653) 2022-07-18 18:46:32 +03:00
Tim Scheuermann
cb6cee1883 [MM-45769] Properly initialize the request.Context for imports and tests (#20659) 2022-07-18 10:58:06 +02:00
Tim Scheuermann
6dc897b04f MM-45193 Use context for channel logging (#20575) 2022-07-14 11:01:29 +02:00
Martin Kraft
1f34e8ba2e MM-44351: Creates new Custom Group Admin system role. (#20573)
* MM-44351: Creates new Custom Group Admin system role.

* MM-44351: Adds missing test mock.

* MM-44351: Adds missing mocks.
2022-07-13 09:38:07 +02:00
Tim Scheuermann
54c98b4019 [MM-43787] Replace hardcoded PGP key with embedded one (#20626) 2022-07-12 16:45:24 +02:00
Nathaniel Allred
f639122376 Usage: Round messages to 1K, files to 100MB (#20603) 2022-07-11 07:21:29 -05:00
Tim Scheuermann
58fea61cc4 Add mocks, layers and generated as rules to the make file (#20585) 2022-07-05 17:39:31 +02:00
Ibrahim Serdar Acikgoz
717a4d04a9 Use any instead of interface{} (#20577)
* replace interface{} with any
2022-07-05 09:46:50 +03:00
Agniva De Sarker
b5dec4f4d9 MM-40450: Follow redirects in image proxy (#20516)
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
```
2022-06-22 09:12:12 +05:30
Tim Scheuermann
eb034fc981 MM-44236 Update server dependencies (#20444) 2022-06-16 08:50:55 +02:00
Martin Kraft
4e9edef1f1 Improves group membership telemetry. (#20437)
* 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>
2022-06-15 09:42:27 -04:00
Nathaniel Allred
1876d69210 add file storage telemetry (#20408)
* cloud instances send file storage telemetry
* Add core disabled plugins (`disabled_default_plugins`) per analytics team request
2022-06-14 20:07:33 -05:00
Agniva De Sarker
7c1b8cd937 MM-43733: Set concurrency limits via configuration (#20413)
```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
2022-06-11 00:24:46 +05:30
Guillermo Vayá
c6f80dfe0a [MM-44573] Sanitize options (#20380)
Automatic Merge
2022-06-09 00:36:28 +03:00
darkLord19
a251510717 remove unused code around unimplemented ExperimentalSettings.EnableClickToReply setting (#20389) 2022-06-08 15:40:30 -04:00
Ibrahim Serdar Acikgoz
fe3816cc20 store: guests will only receive results of which channels they are in (#20295)
* 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>
2022-06-01 09:18:59 +03:00
Alejandro García Montoro
b10ff1b1f7 MM-44221: Add admin console setting to enable/disable App Bar (#20224)
* Revert "[MM-39820] Add AppBarEnabled feature flag (#18967)"

This reverts commit ba1b279c5f.

* Add EnableAppBar admin setting

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-05-25 22:53:51 +02:00
Michael Kochell
ea5bfe3fd9 Cloud Freemium - Integrations (#20185)
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-05-25 12:36:08 -04:00
Kyriakos Z
9a67ae9ac6 MM-38982: fixes SVG uploading (#20141)
* 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
2022-05-20 10:26:21 -04:00
Vishal
fd703a365b [MM-43917] Cloud Freemium limits API: messages/posts (#20152)
* WIP - Add api and app funcs

* Add test cases

* Add utils testcases

* Exclude deleted posts

* Add doc for func

* Move api from cloud to usage

* Allow api access to authenticated users

* Change int to int64

* Fix lint issue

* Simplify err check

Co-authored-by: Ashish Bhate <ashish.bhate@mattermost.com>

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Ashish Bhate <ashish.bhate@mattermost.com>
2022-05-17 13:30:40 +02:00
Ashish Bhate
3c625743e5 MM-43716: enforce size limits in slack importer (#20144)
Automatic Merge
2022-05-12 16:09:55 +03:00
Martin Kraft
cb3d8f0a1c MM-41211: Replaces SessionLength*InDays with SessionLength*InHours. (#19838)
* MM-41211: Replaces SessionLength[Web|Mobile|SSO]InDays with SessionLength[Web|Mobile|SSO]InHours.

* MM-41211: Clear the value of the old config settings.
2022-04-28 17:31:35 -04:00
Mustafa Kara
4e7cfc2095 Replace expired GPG public key which is used to upgrade to enterprise (#20075)
Signed-off-by: Mustafa Kara <mustafa.kara@mattermost.com>
2022-04-27 18:16:56 +03:00
Ibrahim Serdar Acikgoz
6ab7cd0f1a jobs: add config cleanup job (#19987) 2022-04-15 10:31:10 +03:00
Nathaniel Allred
1198191a1c fix makefile mock generator typos (#19963)
* fix makefile mock generator typos
* rerun mocks
2022-04-13 08:05:57 -05:00