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

79 Коммитов

Автор SHA1 Сообщение Дата
Agniva De Sarker
94de9c8175 MM-52352: Limit channel search results (#23070)
https://mattermost.atlassian.net/browse/MM-52352

```release-note
NONE
```
2023-04-22 10:14:54 +05:30
Agniva De Sarker
67735be261 MM-52216: Trim errors (#23040)
https://mattermost.atlassian.net/browse/MM-52216
```release-note
NONE
```
2023-04-21 22:23:56 +05:30
Conor Macpherson
c98c43456e Merge pull request #22657 from mattermost/MM-50966-in-product-expansion-backend
MM-50966 - In Product Expansion Backend
2023-04-20 10:38:47 -04:00
Allan Guwatudde
87555aa242 [MM-52158] - Don't show deprecation/move to annual banners to some clients (#22963)
* [MM-52158] - Don't show deprecation/move to annual banners to some clients

* create const

* feedback impl

* update test names

* update banner text

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-04-20 17:04:41 +03:00
Jesse Hallam
89f2ebc836 Channels/api4 testing improvements (#22938)
* api4/post_test: fix missing TearDown

* api4/plugin_test: dont test timeout, saving 120s

* api4/channel_test: dont try to delete town square

* api4/channel_test: check public channel names deterministically

* api4/file_test: fix darwin assertions on go files

* api4/notify_admin_test: fix expect/actual order

* api4/team_test: make TestGetAllTeams deterministic

* api4/plugin_test: avoid nested test helpers

* api4/post_test: avoid nested test helpers

* api4/websocket_test: externalize log buffer

* testlib/helper: unset common env

* linting issues

* simplify TestGetFileHeaders

* team_test: leverage ElementsMatch
2023-04-20 09:52:59 -03:00
Julien Tant
0a2a39773c [MM-52152] Expose license SkuShortName to all users (#22955) 2023-04-19 10:38:56 -07:00
Tanmay Datta
1f57819054 [MM-51089] Fix sorting value of category in CreateSidebarCategoryForTeamForUser (#22455)
Co-authored-by: Mattermost Build <build@mattermost.com>
2023-04-19 09:59:49 -04:00
Pablo Andrés Vélez Vidal
b5c48e75b3 MM 50960 - Add company name and invite members pages to preparing-workspace for self-hosted (#22838)
* MM-50960 - store system organization name

* restore the preparing workspace plugins and invite screens

* add back the page lines for the design

* add lines back and organize styles

* set back documentation to monorepo style and disable board as a product

* fix organization link and style skip button

* create team on organization name screen continue button click

* make sure there are not already created team and if so just update team name

* update the team display name if team has already been created

* cover error scenarios during team creation

* add pr feedback and add a couple of unit tests

* fix translation server error; make sure only update display name if it has changed in the form

* temp advances

* rewrite unit tests using react-testing library; fix unit tests

* fix translations

* make sure the launching workspace finish in cloud installations

* remove redundant validation

* fix unit tests

* remove unintended config value left after merge conflict
2023-04-19 15:31:47 +02:00
Conor Macpherson
3ca789979a remove other use of relfection to determine error. 2023-04-19 09:23:45 -04:00
Kyriakos Z
a24111f9bd MM-45009: Delete ThreadMemberships from "left" channels (#22559)
* MM-50550: Filter out threads from "left" channels v2

Currently leaving a channel doesn't affect the thread memberships of
that user/channel combination.
This PR aims to filter out all threads from those channels for the user.

Adds a DeleteAt column in the ThreadMemberships table, and filter out
all thread memberships that are "deleted".
Each time a user leaves a channel all thread memberships are going to be
marked as deleted, and when a user joins a channel again all those
existing thread memberships will be re-instantiated.

Adds a migration to mark all existing thread memberships as deleted
depending on whether there exists a channel membership for that
channel/user.

* Added migration files into list

* Fixes tests

* Fixes case where DeleteAt would be null

* Guard thread API endpoints with appropriate perms

* Deletes ThreadMembership rows upon leaving channel

* Minor style changes

* Use NoTranslation error

* Refactors tests

* Adds API tests to assert permissions on Team

* Adds tests, and fixes migrations

* Fixes test description

* Fix test

* Removes check on DM/GMs

* Change the MySQL query in the migration

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-04-19 15:20:34 +03:00
Agniva De Sarker
c34a50a6c7 MM-50427: Make MM survive DB replica outage (#22888)
We monitor the health of DB replicas, and on a fatal error,
take them out of the pool.

On a separate goroutine, we keep pinging the unhealthy replicas,
and on getting a good response back, we add them back to the pool.

https://mattermost.atlassian.net/browse/MM-50427

```release-note
Mattermost is now resilient against DB replica outages and will
dynamically choose a replica if it's alive.

Also added a config parameter ReplicaMonitorIntervalSeconds
whose default value is 5. This controls how frequently unhealthy
replicas will be monitored for liveness check.
```

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-04-19 17:03:18 +05:30
Ben Schumacher
84a3042249 Update slash command permission (#22468)
* Update slash command permission

* Fix permission
2023-04-18 21:54:20 +02:00
Conor Macpherson
f0ed400732 remove use of reflection to detect app err. 2023-04-18 13:47:35 -04:00
Conor Macpherson
adb4ef04c1 Merge branch 'master' into MM-50966-in-product-expansion-backend 2023-04-18 12:07:48 -04:00
Miguel de la Cruz
067e36c23c Enable products for tests (#22757)
* Enable products for channels tests

* increase unit test timeout; check IsConfigReadOnly

* make app-layers

* Avoid loading boards tempaltes between tests to improve speed

* Fix delete query to be compatible with both databases

* Avoid preserving the templates for boards store tests

* Run all tests in one command

* Revert "Run all tests in one command"

This reverts commit 0330f7cd8f96b47776770e8f80ba6ba18d98b8d1.

* concurrent pkg group tests in CI

* Revert "Revert "Run all tests in one command""

This reverts commit 73892fec772575ff054a99ba9e00a7b57ca74164.

* Revert "concurrent pkg group tests in CI"

This reverts commit 550fb6cdd4a7f14d9632f2626bc66f389173b5d9.

* try testing 3 subsets of packages concurrently to improve time taken

* Revert "try testing 3 subsets of packages concurrently to improve time taken"

This reverts commit 97475f3c4eafa8bbe047097e0841220884f68cdc.

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: wiggin77 <wiggin77@warpmail.net>
2023-04-18 13:58:33 +02:00
Agniva De Sarker
b200a07881 v8.0 module release (#22975)
https://mattermost.atlassian.net/browse/MM-52079

```release-note
We upgrade the module version to 8.0. The new module path is github.com/mattermost-server/server/v8.
```


Co-authored-by: Doug Lauder <wiggin77@warpmail.net>
2023-04-18 11:05:28 +05:30
Conor Macpherson
98aa1f070b Merge branch 'master' into MM-50966-in-product-expansion-backend 2023-04-17 16:32:54 -04:00
Conor Macpherson
a1605d51f6 Remove checks for self hosted expansion featue flags/configs, add copy of the self hosted confirm handler specifically for expansions. 2023-04-17 16:02:04 -04:00
Conor Macpherson
61456b6846 Merge pull request #22917 from mattermost/MM-51907-route-true-up-telemetry-to-cws
MM-51907 - Route True-Up Review Telemetry to CWS
2023-04-17 15:47:21 -04:00
Conor Macpherson
a47c3cf859 Merge branch 'master' into MM-50966-in-product-expansion-backend 2023-04-17 15:39:37 -04:00
Conor Macpherson
aa7939264f Check if telemetry is disable, and only submit the true up profile if it is disabled. 2023-04-17 15:09:54 -04:00
Agniva De Sarker
56bf1b695a MM-49984: Displaying active search backend in system console (#22721)
This will be shown in the system console to let users know
which search backend is active.

Implemented via adding an extra param in the ping response.

https://mattermost.atlassian.net/browse/MM-49984

```release-note
The database section in the system console now has an additional
read-only section which shows the active search backend in use.

This can be helpful to confirm which is the currently active
search engine when there are multiple of them configured.
```
---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-04-14 14:28:50 +05:30
Agniva De Sarker
470e4c9d66 MM-51786: Sentry crash while installing a blocked plugin (#22804)
We would return "nil, nil" if a plugin was on the blocklist.
This would cause a nil dereference panic while trying to add
struct fields from manifest to the audit logs.

To avoid it, we return an error explicitly and ignore the
error ids to unnecessarily have it log an error.

https://mattermost.atlassian.net/browse/MM-51786

```release-note
NONE
```
2023-04-14 13:32:05 +05:30
Ibrahim Serdar Acikgoz
a2e70eb71c server/channels: remove newWebConn method (#22933) 2023-04-14 09:56:05 +03:00
Agniva De Sarker
574e61bcc1 MM-52009: Fix hub data race (#22925)
After the monorepo integration, the boards product
was started before we started the hub.

This led to a data race where the GetHubForUserId was actually
called before the hub was initialized.

To fix this we initialize the platform first, and then the products.

https://mattermost.atlassian.net/browse/MM-52009
```release-note
NONE
```
2023-04-13 19:39:16 +05:30
Conor Macpherson
27d959485e move setup/teardown into each test. 2023-04-13 09:54:58 -04:00
Conor Macpherson
7cc866ed89 actually fix tests through mocks. 2023-04-13 09:34:48 -04:00
Sinan Sonmez (Chaush)
35d3e3e91e GH21563: Add the request context and logger to all public methods in app/admin.go (#22898)
* migrate mlog

* fix linter issue
2023-04-13 14:21:11 +05:30
Konstantinos Pittas
40349cddd4 [MM-51401] Add an extra check for the schema (#22531)
Co-authored-by: Mattermost Build <build@mattermost.com>
2023-04-13 11:00:55 +03:00
Julien Tant
2dafc51be2 Work Template: use mattermost-server/playbooks package instead of old playbook repo (#22908) 2023-04-12 13:53:22 -07:00
Conor Macpherson
0b731f4330 fix tests. 2023-04-12 16:22:10 -04:00
Conor Macpherson
eebd57ead1 Add ok response code to hopefully fix tests. 2023-04-12 15:06:55 -04:00
Conor Macpherson
dab14be745 fix mocks 2023-04-12 14:44:33 -04:00
Conor Macpherson
dcdc9c5f4b Merge branch 'master' of github.com:mattermost/mattermost-server into MM-50966-in-product-expansion-backend 2023-04-12 14:26:59 -04:00
Conor Macpherson
4bd3701363 remove new model in favor of making self hosted confirm payment method request more generic. 2023-04-12 14:15:11 -04:00
Conor Macpherson
451f169fea use a more generic model for self hosted confirm payment method. 2023-04-12 14:12:28 -04:00
Conor Macpherson
77e1fbfbc8 Change error upon failure of true up review submission to CWS. 2023-04-12 10:12:33 -04:00
Conor Macpherson
382894b41c revert change to show true up review when telemetry is enabled, always send true up data to CWS for telemetry capture. 2023-04-12 09:56:46 -04:00
Claudio Costa
b00ca20abe [MM-50827] Detect content-type if missing in response during link metadata generation (#22885)
* Detect content-type if missing in response during link metadata generation

* Initialize buffer only when necessary
2023-04-12 07:53:03 -06:00
Ben Schumacher
4cc370098e [MM-26398] Remove deprecated model.CommandArgs.Session (#22815) 2023-04-12 01:10:59 +02:00
Conor Macpherson
33d3c90654 Add mocks/layers. 2023-04-11 14:15:56 -04:00
Conor Macpherson
dd2e325c24 Ensure admins can send true up telemetry, even if telemetry is disabled. 2023-04-11 12:52:54 -04:00
Agniva De Sarker
bf952e690b MM-52088: Skip Flaky test (#22910)
https://mattermost.atlassian.net/browse/MM-52088

```release-note
NONE
```
2023-04-11 21:40:42 +05:30
Julien Tant
6e7759b314 [MM-51844 & MM-51843] Work template permissions check (#22825) 2023-04-10 09:51:20 -07:00
Agniva De Sarker
bcf115e315 Upgrade mockery to fix errors (#22892)
Mockery started to throw errors like "Unexpected package creation during export data loading".

This was consistently reproducible locally and on upgrade, it has gone away.

```release-note
NONE
```
2023-04-10 14:20:57 +05:30
Jesse Hallam
4b7f6cb974 bind to localhost:0 for tests (#22839)
* bind to localhost:0 for tests

Explicitly bind to `localhost:0` instead of just `:0` to avoid binding to all available interfaces and in turn avoid triggering firewall warnings on MacOS.

* fix Playbooks to use dynamic port

* TestMetrics: handle ipv4 localhost too

* TestMetrics: linting
2023-04-06 09:59:58 -03:00
Rohitesh Gupta
7325c38c39 Fixes MM-50733 (#22784) 2023-04-05 21:58:21 +02:00
Konstantinos Pittas
7029d88443 [MM-51034] Sanitize embedded posts transmitted over WS (#22424)
Co-authored-by: Mattermost Build <build@mattermost.com>
2023-04-05 21:43:22 +03:00
Nick Misasi
62e6f29638 Undo accidental merge (#22848) 2023-04-05 11:24:32 -04:00
Nick Misasi
6fce376e7b [MM-51905] Fix: Successful trial request shows error modal (#22800)
* License public key to test env for mono-repo

* Fix error modal showing on a successful trial request
2023-04-05 10:53:07 -04:00